|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections15.CollectionUtils
net.dontdrinkandroot.utils.collections.CollectionUtils
public class CollectionUtils
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.collections15.CollectionUtils |
|---|
EMPTY_COLLECTION |
| Constructor Summary | |
|---|---|
CollectionUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
addToMapList(K key,
V value,
java.util.Map<K,java.util.List<V>> map)
|
|
static
|
addToMapSet(K key,
V value,
java.util.Map<K,java.util.Set<V>> map)
|
|
static
|
aggregate(java.util.Collection<T> collection)
|
|
static
|
entriesSortedByValues(java.util.Map<K,V> map)
|
|
static
|
entriesSortedByValuesInverse(java.util.Map<K,V> map)
|
|
static
|
first(java.lang.Iterable<T> iterable)
|
|
static
|
getMean(java.util.Collection<T> collection)
|
|
static
|
getRandom(java.util.Collection<V> collection)
|
|
static boolean |
isEmpty(java.lang.Object obj)
Nullsafe check if a collection is empty. |
|
| Methods inherited from class org.apache.commons.collections15.CollectionUtils |
|---|
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, unmodifiableCollection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionUtils()
| Method Detail |
|---|
public static <T extends java.lang.Number> AggregationResult aggregate(java.util.Collection<T> collection)
public static <T extends java.lang.Number> double getMean(java.util.Collection<T> collection)
public static <T> T first(java.lang.Iterable<T> iterable)
public static boolean isEmpty(java.lang.Object obj)
obj - Null or a subclass of Collection.
java.lang.IllegalArgumentException - Thrown if obj is not null and not an instance of Collection.
public static <K,V> void addToMapList(K key,
V value,
java.util.Map<K,java.util.List<V>> map)
public static <K,V> void addToMapSet(K key,
V value,
java.util.Map<K,java.util.Set<V>> map)
public static <V> V getRandom(java.util.Collection<V> collection)
public static <K,V extends java.lang.Comparable<? super V>> java.util.SortedSet<java.util.Map.Entry<K,V>> entriesSortedByValues(java.util.Map<K,V> map)
public static <K,V extends java.lang.Comparable<? super V>> java.util.SortedSet<java.util.Map.Entry<K,V>> entriesSortedByValuesInverse(java.util.Map<K,V> map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||