java.lang.Object
omix.util.collections.Collections
public final class Collections extends Object
-
Method Summary
Modifier and Type Method Description static <T> boolean
addAll(Collection<? super T> c, T... elements)
static <T> Queue<T>
asLifoQueue(Deque<T> deque)
static <E> List<E>
asList(Collection<E> collection)
static <T> int
binarySearch(List<? extends Comparable<? super T>> list, T key)
static <T> int
binarySearch(List<? extends T> list, T key, Comparator<? super T> c)
static <E> Collection<E>
checkedCollection(Collection<E> c, Class<E> type)
static <E> List<E>
checkedList(List<E> list, Class<E> type)
static <K, V> Map<K,V>
checkedMap(Map<K,V> m, Class<K> keyType, Class<V> valueType)
static <K, V> NavigableMap<K,V>
checkedNavigableMap(NavigableMap<K,V> m, Class<K> keyType, Class<V> valueType)
static <E> NavigableSet<E>
checkedNavigableSet(NavigableSet<E> s, Class<E> type)
static <E> Queue<E>
checkedQueue(Queue<E> queue, Class<E> type)
static <E> Set<E>
checkedSet(Set<E> s, Class<E> type)
static <K, V> SortedMap<K,V>
checkedSortedMap(SortedMap<K,V> m, Class<K> keyType, Class<V> valueType)
static <E> SortedSet<E>
checkedSortedSet(SortedSet<E> s, Class<E> type)
static <E> Iterable<E>
combine(Iterable<? extends E> listA, Iterable<? extends E> listB)
static <E> Iterable<E>
combine(Iterable<? extends E> listA, Iterable<? extends E> listB, Iterable<? extends E> listC)
static <E> Iterable<E>
combine(Iterable<? extends E> listA, Iterable<? extends E> listB, Iterable<? extends E> listC, Iterable<? extends E> listD)
static <E> Iterable<E>
combine(Iterable<? extends E> listA, Iterable<? extends E> listB, Iterable<? extends E> listC, Iterable<? extends E> listD, Iterable<? extends E> listE, Iterable<? extends E>... listFF)
static <E> Collection<E>
combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB)
static <E> Collection<E>
combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB, Collection<? extends E> collectionC)
static <E> Collection<E>
combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB, Collection<? extends E> collectionC, Collection<? extends E> collectionD)
static <E> Collection<E>
combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB, Collection<? extends E> collectionC, Collection<? extends E> collectionD, Collection<? extends E> collectionE, Collection<? extends E>... collectionFF)
static <E> Iterable<E>
combine(Collection<? extends Iterable<? extends E>> lists)
static <E> List<E>
combine(List<? extends E> listA, List<? extends E> listB)
static <E> List<E>
combine(List<? extends E> listA, List<? extends E> listB, List<? extends E> listC)
static <E> List<E>
combine(List<? extends E> listA, List<? extends E> listB, List<? extends E> listC, List<? extends E> listD)
static <E> List<E>
combine(List<? extends E> listA, List<? extends E> listB, List<? extends E> listC, List<? extends E> listD, List<? extends E> listE, List<? extends E>... listFF)
static <E> Collection<E>
combineCollections(Collection<? extends Collection<? extends E>> lists)
static <E> List<E>
combineLists(Collection<? extends List<? extends E>> lists)
static <X, Y> Collection<X>
convert(Collection<Y> collection, Function<Y,X> convertForward)
static <X, Y> Collection<X>
convert(Collection<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <X, Y> Deque<X>
convert(Deque<Y> collection, Function<Y,X> convertForward)
static <X, Y> Deque<X>
convert(Deque<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <X, Y> List<X>
convert(List<Y> collection, Function<Y,X> convertForward)
static <X, Y> List<X>
convert(List<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <K, X, Y> Map<K,X>
convert(Map<K,Y> collection, Function<Y,X> convertForward)
static <K, X, Y> Map<K,X>
convert(Map<K,Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <K, X, Y> NavigableMap<K,X>
convert(NavigableMap<K,Y> collection, Function<Y,X> convertForward)
static <K, X, Y> NavigableMap<K,X>
convert(NavigableMap<K,Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <X, Y> NavigableSet<X>
convert(NavigableSet<Y> collection, Function<Y,X> convertForward)
static <X, Y> NavigableSet<X>
convert(NavigableSet<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <X, Y> Queue<X>
convert(Queue<Y> collection, Function<Y,X> convertForward)
static <X, Y> Queue<X>
convert(Queue<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <X, Y> Set<X>
convert(Set<Y> collection, Function<Y,X> convertForward)
static <X, Y> Set<X>
convert(Set<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <K, X, Y> SortedMap<K,X>
convert(SortedMap<K,Y> collection, Function<Y,X> convertForward)
static <K, X, Y> SortedMap<K,X>
convert(SortedMap<K,Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <X, Y> SortedSet<X>
convert(SortedSet<Y> collection, Function<Y,X> convertForward)
static <X, Y> SortedSet<X>
convert(SortedSet<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward)
static <T> void
copy(List<? super T> dest, List<? extends T> src)
static boolean
disjoint(Collection<?> c1, Collection<?> c2)
static <T> Enumeration<T>
emptyEnumeration()
static <T> Iterator<T>
emptyIterator()
static <T> List<T>
emptyList()
static <T> ListIterator<T>
emptyListIterator()
static <K, V> Map<K,V>
emptyMap()
static <K, V> NavigableMap<K,V>
emptyNavigableMap()
static <E> NavigableSet<E>
emptyNavigableSet()
static <T> Set<T>
emptySet()
static <K, V> SortedMap<K,V>
emptySortedMap()
static <E> SortedSet<E>
emptySortedSet()
static <T> Enumeration<T>
enumeration(Collection<T> c)
static <T> void
fill(List<? super T> list, T obj)
static <E> Collection<E>
filter(Collection<E> collection, Predicate<E> includePattern)
static <E> List<E>
filter(List<E> collection, Predicate<E> includePattern)
static <E> Set<E>
filter(Set<E> set, Predicate<E> includePattern)
static int
frequency(Collection<?> c, Object o)
static int
indexOfSubList(List<?> source, List<?> target)
static <E> Iterable<E>
join(Iterable<E> listA, Iterable<E> listB)
static <E> Iterable<E>
join(Iterable<E> listA, Iterable<E> listB, Iterable<E> listC)
static <E> Iterable<E>
join(Iterable<E> listA, Iterable<E> listB, Iterable<E> listC, Iterable<E> listD)
static <E> Iterable<E>
join(Iterable<E> listA, Iterable<E> listB, Iterable<E> listC, Iterable<E> listD, Iterable<E> listE, Iterable<E>... listFF)
static <E> Iterable<E>
join(Collection<? extends Iterable<E>> lists)
static <E> Collection<E>
join(Collection<E> collectionA, Collection<E> collectionB)
static <E> Collection<E>
join(Collection<E> collectionA, Collection<E> collectionB, Collection<E> collectionC)
static <E> Collection<E>
join(Collection<E> collectionA, Collection<E> collectionB, Collection<E> collectionC, Collection<E> collectionD)
static <E> Collection<E>
join(Collection<E> collectionA, Collection<E> collectionB, Collection<E> collectionC, Collection<E> collectionD, Collection<E> collectionE, Collection<E>... collectionFF)
static String
join(Collection<String> strings, String delimiter)
static <E> List<E>
join(List<E> listA, List<E> listB)
static <E> List<E>
join(List<E> listA, List<E> listB, List<E> listC)
static <E> List<E>
join(List<E> listA, List<E> listB, List<E> listC, List<E> listD)
static <E> List<E>
join(List<E> listA, List<E> listB, List<E> listC, List<E> listD, List<E> listE, List<E>... listFF)
static <E> Collection<E>
joinCollections(Collection<? extends Collection<E>> collections)
static <E> List<E>
joinLists(Collection<? extends List<E>> lists)
static int
lastIndexOfSubList(List<?> source, List<?> target)
static <T> ArrayList<T>
list(Enumeration<T> e)
static <T extends Object & Comparable<? super T>>
Tmax(Collection<? extends T> coll)
static <T> T
max(Collection<? extends T> coll, Comparator<? super T> comp)
static <T extends Object & Comparable<? super T>>
Tmin(Collection<? extends T> coll)
static <T> T
min(Collection<? extends T> coll, Comparator<? super T> comp)
static <T> List<T>
nCopies(int n, T o)
static <E> Set<E>
newSetFromMap(Map<E,Boolean> map)
static <T> boolean
replaceAll(List<T> list, T oldVal, T newVal)
static void
reverse(List<?> list)
static <T> Comparator<T>
reverseOrder()
static <T> Comparator<T>
reverseOrder(Comparator<T> cmp)
static void
rotate(List<?> list, int distance)
static void
shuffle(List<?> list)
static void
shuffle(List<?> list, Random rnd)
static <T> Set<T>
singleton(T o)
static <T> List<T>
singletonList(T o)
static <K, V> Map<K,V>
singletonMap(K key, V value)
static <T extends Comparable<? super T>>
voidsort(List<T> list)
static <T> void
sort(List<T> list, Comparator<? super T> c)
static void
swap(List<?> list, int i, int j)
static <T> Collection<T>
synchronizedCollection(Collection<T> c)
static <T> List<T>
synchronizedList(List<T> list)
static <K, V> Map<K,V>
synchronizedMap(Map<K,V> m)
static <K, V> NavigableMap<K,V>
synchronizedNavigableMap(NavigableMap<K,V> m)
static <T> NavigableSet<T>
synchronizedNavigableSet(NavigableSet<T> s)
static <T> Set<T>
synchronizedSet(Set<T> s)
static <K, V> SortedMap<K,V>
synchronizedSortedMap(SortedMap<K,V> m)
static <T> SortedSet<T>
synchronizedSortedSet(SortedSet<T> s)
static <T> Collection<T>
unmodifiableCollection(Collection<? extends T> c)
static <T> List<T>
unmodifiableList(List<? extends T> list)
static <K, V> Map<K,V>
unmodifiableMap(Map<? extends K,? extends V> m)
static <K, V> NavigableMap<K,V>
unmodifiableNavigableMap(NavigableMap<K,? extends V> m)
static <T> NavigableSet<T>
unmodifiableNavigableSet(NavigableSet<T> s)
static <T> Set<T>
unmodifiableSet(Set<? extends T> s)
static <K, V> SortedMap<K,V>
unmodifiableSortedMap(SortedMap<K,? extends V> m)
static <T> SortedSet<T>
unmodifiableSortedSet(SortedSet<T> s)
-
Method Details
-
join
-
asList
-
joinLists
-
join
-
join
-
join
-
join
-
combineLists
-
combine
-
combine
-
combine
-
combine
-
join
-
join
-
join
-
join
-
join
-
combine
-
combine
-
combine
-
combine
-
combine
-
joinCollections
-
join
-
join
public static <E> Collection<E> join(Collection<E> collectionA, Collection<E> collectionB, Collection<E> collectionC) -
join
public static <E> Collection<E> join(Collection<E> collectionA, Collection<E> collectionB, Collection<E> collectionC, Collection<E> collectionD) -
join
@SafeVarargs public static <E> Collection<E> join(Collection<E> collectionA, Collection<E> collectionB, Collection<E> collectionC, Collection<E> collectionD, Collection<E> collectionE, Collection<E>... collectionFF) -
combineCollections
public static <E> Collection<E> combineCollections(Collection<? extends Collection<? extends E>> lists) -
combine
public static <E> Collection<E> combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB) -
combine
public static <E> Collection<E> combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB, Collection<? extends E> collectionC) -
combine
public static <E> Collection<E> combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB, Collection<? extends E> collectionC, Collection<? extends E> collectionD) -
combine
@SafeVarargs public static <E> Collection<E> combine(Collection<? extends E> collectionA, Collection<? extends E> collectionB, Collection<? extends E> collectionC, Collection<? extends E> collectionD, Collection<? extends E> collectionE, Collection<? extends E>... collectionFF) -
filter
-
filter
-
filter
-
convert
public static <X, Y> Collection<X> convert(Collection<Y> collection, Function<Y,X> convertForward) -
convert
public static <X, Y> Collection<X> convert(Collection<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward) -
convert
-
convert
-
convert
-
convert
-
convert
public static <X, Y> NavigableSet<X> convert(NavigableSet<Y> collection, Function<Y,X> convertForward) -
convert
public static <X, Y> NavigableSet<X> convert(NavigableSet<Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward) -
convert
-
convert
-
convert
-
convert
-
convert
-
convert
-
convert
public static <K, X, Y> NavigableMap<K,X> convert(NavigableMap<K,Y> collection, Function<Y,X> convertForward) -
convert
public static <K, X, Y> NavigableMap<K,X> convert(NavigableMap<K,Y> collection, Function<Y,X> convertForward, Function<X,Y> convertBackward) -
convert
-
convert
-
convert
-
convert
-
addAll
-
asLifoQueue
-
binarySearch
-
binarySearch
-
checkedCollection
-
checkedList
-
checkedMap
-
checkedNavigableMap
public static <K, V> NavigableMap<K,V> checkedNavigableMap(NavigableMap<K,V> m, Class<K> keyType, Class<V> valueType) -
checkedNavigableSet
-
checkedQueue
-
checkedSet
-
checkedSortedMap
-
checkedSortedSet
-
copy
-
disjoint
-
emptyEnumeration
-
emptyIterator
-
emptyList
-
emptyListIterator
-
emptyMap
-
emptyNavigableMap
-
emptyNavigableSet
-
emptySet
-
emptySortedMap
-
emptySortedSet
-
enumeration
-
fill
-
frequency
-
indexOfSubList
-
lastIndexOfSubList
-
list
-
max
-
max
-
min
-
min
-
nCopies
-
newSetFromMap
-
replaceAll
-
reverse
-
reverseOrder
-
reverseOrder
-
rotate
-
shuffle
-
shuffle
-
singleton
-
singletonList
-
singletonMap
-
sort
-
sort
-
swap
-
synchronizedCollection
-
synchronizedList
-
synchronizedMap
-
synchronizedNavigableMap
-
synchronizedNavigableSet
-
synchronizedSet
-
synchronizedSortedMap
-
synchronizedSortedSet
-
unmodifiableList
-
unmodifiableCollection
-
unmodifiableMap
-
unmodifiableNavigableMap
-
unmodifiableNavigableSet
-
unmodifiableSet
-
unmodifiableSortedMap
-
unmodifiableSortedSet
-