at.molindo.utils.collections
Class CollectionUtils
java.lang.Object
at.molindo.utils.collections.CollectionUtils
public class CollectionUtils
- extends Object
|
Method Summary |
static boolean |
empty(Collection<?> c)
|
static boolean |
empty(Map<?,?> c)
|
static
|
first(Collection<T> c)
|
static
|
first(Map<K,V> c)
|
static
|
firstKey(Map<K,?> c)
|
static
|
firstValue(Map<?,V> c)
|
static
|
list(E... e)
|
static
|
list(Iterable<E> e)
|
static
|
putIfAbsent(ConcurrentMap<K,V> map,
K key,
V value)
|
static
|
set(E... e)
|
static
|
set(Iterable<E> e)
|
static
|
sortedSet(E... e)
|
static
|
sortedSet(Iterable<E> e)
|
static
|
subList(List<T> list,
int first,
int count)
a sublist implementation that is diffrent from
List.subList(int, int) as it handles out of bounds indexes
gracefully |
static
|
unmodifiableList(E... e)
|
static
|
unmodifiableList(Iterable<E> e)
|
static
|
unmodifiableSet(E... e)
|
static
|
unmodifiableSet(Iterable<E> e)
|
static
|
unmodifiableSortedSet(E... e)
|
static
|
unmodifiableSortedSet(Iterable<E> e)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
unmodifiableSet
public static <E> Set<E> unmodifiableSet(Iterable<E> e)
unmodifiableSet
public static <E> Set<E> unmodifiableSet(E... e)
set
public static <E> HashSet<E> set(E... e)
set
public static <E> HashSet<E> set(Iterable<E> e)
unmodifiableSortedSet
public static <E> SortedSet<E> unmodifiableSortedSet(E... e)
unmodifiableSortedSet
public static <E> SortedSet<E> unmodifiableSortedSet(Iterable<E> e)
sortedSet
public static <E> TreeSet<E> sortedSet(E... e)
sortedSet
public static <E> TreeSet<E> sortedSet(Iterable<E> e)
unmodifiableList
public static <E> List<E> unmodifiableList(E... e)
unmodifiableList
public static <E> List<E> unmodifiableList(Iterable<E> e)
list
public static <E> ArrayList<E> list(E... e)
list
public static <E> ArrayList<E> list(Iterable<E> e)
subList
public static <T> List<T> subList(List<T> list,
int first,
int count)
- a sublist implementation that is diffrent from
List.subList(int, int) as it handles out of bounds indexes
gracefully
empty
public static boolean empty(Collection<?> c)
empty
public static boolean empty(Map<?,?> c)
first
public static <T> T first(Collection<T> c)
first
public static <K,V> Map.Entry<K,V> first(Map<K,V> c)
firstKey
public static <K> K firstKey(Map<K,?> c)
firstValue
public static <V> V firstValue(Map<?,V> c)
putIfAbsent
public static <K,V> V putIfAbsent(ConcurrentMap<K,V> map,
K key,
V value)
Copyright © 2011 Molindo GmbH. All Rights Reserved.