@SuppressWarnings({ "rawtypes", "unchecked" }) public final class CollectionUtils extends Object
Collection utility methods.
Type Params | Return Type | Name and description |
---|---|---|
|
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 |
<T> |
public static List<T> |
newList(T values) |
<K, V> |
public static Map<K, V> |
newMap(Object keysAndValues) |
<T> |
public static Set<T> |
newSet(T values) |
Gets a child map of the given parent map or returns an empty map if it doesn't exist
parent
- The parent mapkey
- The key that holds the child map