|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.databene.commons.CollectionUtil
public final class CollectionUtil
Provides Collection-related utility methods.
Created: 18.12.2006 06:46:24
| Constructor Summary | |
|---|---|
CollectionUtil()
|
|
| Method Summary | ||
|---|---|---|
static
|
add(C target,
U... values)
Adds the content of an array to a collection |
|
static
|
buildMap(K key,
V value)
|
|
static java.util.Map |
buildMap(java.lang.Object... keyValuePairs)
|
|
static java.util.Map |
buildOrderedMap(java.lang.Object... keyValuePairs)
|
|
static
|
containsCaseInsensitive(java.lang.String key,
java.util.Map<java.lang.String,V> map)
|
|
static
|
copy(java.util.List<? extends T> src,
int offset,
int length)
|
|
static
|
emptyList()
|
|
static
|
equalsIgnoreOrder(java.util.List<T> a1,
java.util.List<T> a2)
Compares two lists for identical content, accepting different order. |
|
static
|
extractArray(java.util.List<? extends T> source,
java.lang.Class<T> componentType,
int fromIndex,
int toIndex)
|
|
static
|
getCaseInsensitive(java.lang.String key,
java.util.Map<java.lang.String,V> map)
|
|
static boolean |
isEmpty(java.util.Collection<?> collection)
|
|
static
|
lastElement(java.util.List<T> list)
|
|
static
|
newInstance(java.lang.Class<T> collectionType)
Creates a new instance of a Collection. |
|
static
|
ofEqualContent(java.util.List<T> list,
T[] array)
|
|
static
|
toArray(java.util.Collection<? extends T> source)
|
|
static
|
toArray(java.util.Collection<? extends T> source,
java.lang.Class<T> componentType)
|
|
static char[] |
toArray(java.util.Collection<java.lang.Character> source)
|
|
static
|
toList(T... array)
Converts an array into a list. |
|
static
|
toListOfType(S... array)
|
|
static
|
toSet(T... elements)
Creates a HashSet filled with the specified elements |
|
static
|
toSortedSet(U... elements)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionUtil()
| Method Detail |
|---|
public static boolean isEmpty(java.util.Collection<?> collection)
public static <T> java.util.List<T> toList(T... array)
array - the array to convert into a list.
public static <T,S> java.util.List<T> toListOfType(S... array)
public static <T> java.util.Set<T> toSet(T... elements)
elements - the content of the Set
public static <T,U extends T> java.util.SortedSet<T> toSortedSet(U... elements)
public static <T,U extends T,C extends java.util.Collection<? super T>> C add(C target,
U... values)
target - the collection to be extendedvalues - the values to add
public static <T> java.util.List<T> copy(java.util.List<? extends T> src,
int offset,
int length)
public static <T,U> T[] toArray(java.util.Collection<? extends T> source)
public static <T> T[] toArray(java.util.Collection<? extends T> source,
java.lang.Class<T> componentType)
public static <T> T[] extractArray(java.util.List<? extends T> source,
java.lang.Class<T> componentType,
int fromIndex,
int toIndex)
public static char[] toArray(java.util.Collection<java.lang.Character> source)
public static <K,V> java.util.Map<K,V> buildMap(K key,
V value)
public static java.util.Map buildMap(java.lang.Object... keyValuePairs)
public static java.util.Map buildOrderedMap(java.lang.Object... keyValuePairs)
public static <T extends java.util.Collection<U>,U> T newInstance(java.lang.Class<T> collectionType)
public static <T> boolean equalsIgnoreOrder(java.util.List<T> a1,
java.util.List<T> a2)
public static <V> V getCaseInsensitive(java.lang.String key,
java.util.Map<java.lang.String,V> map)
public static <V> boolean containsCaseInsensitive(java.lang.String key,
java.util.Map<java.lang.String,V> map)
public static <T> boolean ofEqualContent(java.util.List<T> list,
T[] array)
public static <T> T lastElement(java.util.List<T> list)
public static <T> java.util.List<T> emptyList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||