public class CollectionUtils
extends org.apache.commons.collections15.CollectionUtils
| Constructor and Description |
|---|
CollectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> void |
addToMapList(K key,
V value,
Map<K,List<V>> map) |
static <K,V> void |
addToMapSet(K key,
V value,
Map<K,Set<V>> map) |
static <T extends Number> |
aggregate(Collection<T> collection) |
static <K,V extends Comparable<? super V>> |
entriesSortedByValues(Map<K,V> map) |
static <K,V extends Comparable<? super V>> |
entriesSortedByValuesInverse(Map<K,V> map) |
static <T> T |
first(Iterable<T> iterable) |
static <T extends Number> |
getMean(Collection<T> collection) |
static <V> V |
getRandom(Collection<V> collection) |
static boolean |
isEmpty(Object obj)
Nullsafe check if a collection is empty.
|
addAll, addAll, addAll, cardinality, collect, collect, collect, collect, containsAny, countMatches, disjunction, exists, filter, find, forAllDo, get, getCardinalityMap, index, index, intersection, isEqualCollection, isFull, isProperSubCollection, isSubCollection, main, maxSize, predicatedCollection, reverseArray, select, select, selectRejected, selectRejected, size, subtract, synchronizedCollection, transform, transformedCollection, typedCollection, union, unmodifiableCollectionpublic static <T extends Number> AggregationResult aggregate(Collection<T> collection)
public static <T extends Number> double getMean(Collection<T> collection)
public static <T> T first(Iterable<T> iterable)
public static boolean isEmpty(Object obj)
obj - Null or a subclass of Collection.IllegalArgumentException - Thrown if obj is not null and not an instance of Collection.public static <V> V getRandom(Collection<V> collection)
public static <K,V extends Comparable<? super V>> SortedSet<Map.Entry<K,V>> entriesSortedByValues(Map<K,V> map)
public static <K,V extends Comparable<? super V>> SortedSet<Map.Entry<K,V>> entriesSortedByValuesInverse(Map<K,V> map)
Copyright © 2013 dontdrinkandroot. All Rights Reserved.