public class CollectionHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Set<T> |
asSet(T... ts)
Returns an unmodifiable set containing the given elements.
|
static boolean |
isEmptyOrContainsOnlyNull(Object[] objects) |
static <T> ClosableIterator<T> |
newClosableIterator(Iterable<T> iterable) |
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap() |
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap(int initialCapacity) |
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap(Map<? extends K,? extends V> other) |
static <K,V> HashMap<K,V> |
newHashMap() |
static <K,V> HashMap<K,V> |
newHashMap(int initialCapacity) |
static <K,V> HashMap<K,V> |
newHashMap(Map<? extends K,? extends V> other) |
public static <T> Set<T> asSet(T... ts)
T - the type of the element in the setts - the elements from which to create a setnull in case the given element array is
null.public static <K,V> HashMap<K,V> newHashMap()
public static <K,V> HashMap<K,V> newHashMap(int initialCapacity)
public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap()
public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap(int initialCapacity)
public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap(Map<? extends K,? extends V> other)
public static <T> ClosableIterator<T> newClosableIterator(Iterable<T> iterable)
public static boolean isEmptyOrContainsOnlyNull(Object[] objects)
Copyright © 2010-2017 Red Hat, Inc., Emmanuel Bernard and various contributors. All Rights Reserved.