public final class CollectionUtils
extends Object
Collection utility methods.
-
Method Summary
Gets a child map of the given parent map or returns an empty map if it doesn't exist
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
newMap
public static <K,
V> Map<K,V> newMap(Object... keysAndValues)
-
newSet
public static <T> Set<T> newSet(T... values)
-
newList
public static <T> List<T> newList(T... values)
-
getOrCreateChildMap
public static Map getOrCreateChildMap(Map parent,
String key)
Gets a child map of the given parent map or returns an empty map if it doesn't exist
- Parameters:
parent - The parent map
key - The key that holds the child map
- Returns:
- The child map