|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unkrig.commons.util.collections.CollectionUtil
public final class CollectionUtil
java.util.collection-related utility methods.
| Field Summary | |
|---|---|
static java.util.Iterator |
AT_END
An iterator which is at its end. |
static java.util.SortedMap |
EMPTY_SORTED_MAP
Desperately missing from java.util.Collections. |
static java.util.SortedSet |
EMPTY_SORTED_SET
Desperately missing from java.util.Collections. |
| Method Summary | ||
|---|---|---|
static
|
emptySortedMap()
Desperately missing from java.util.Collections. |
|
static
|
emptySortedSet()
Desperately missing from java.util.Collections. |
|
static
|
map(K[] keys,
V[] values)
Returns an unmodifiable map, mapping the given key-value pairs. |
|
static
|
map(java.lang.Object... keyValuePairs)
Returns an unmodifiable map, mapping the given key-value pairs. |
|
static
|
removeFirstFrom(java.util.Collection<T> subject)
Removes and returns the first element of the given collection. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.SortedMap EMPTY_SORTED_MAP
java.util.Collections.
public static final java.util.SortedSet EMPTY_SORTED_SET
java.util.Collections.
public static final java.util.Iterator AT_END
| Method Detail |
|---|
@Nullable public static <T> T removeFirstFrom(java.util.Collection<T> subject)
null iff the collection is emptypublic static <K,V> java.util.Map<K,V> map(java.lang.Object... keyValuePairs)
null keys and null values are
supported.
keyValuePairs - An alternating sequence of keys and values
java.lang.ArrayIndexOutOfBoundsException - The length of keyValuePairs is odd
java.lang.IllegalArgumentException - Two of the keys are equal
public static <K,V> java.util.Map<K,V> map(K[] keys,
V[] values)
null keys and null values are
supported.
java.lang.ArrayIndexOutOfBoundsException - The length of keyValuePairs is odd
java.lang.IllegalArgumentException - Two of the keys are equalpublic static <K,V> java.util.SortedMap<K,V> emptySortedMap()
java.util.Collections.
public static <T> java.util.SortedSet<T> emptySortedSet()
java.util.Collections.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||