public final class Collections extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> ChoppedElements<T> |
chopElements(Collection<T> collection,
int resultsPerPage) |
static <E,T extends Collection<E>> |
containsAny(T collection,
E[] elements) |
static <T extends Collection<?>> |
containsAny(T collectionA,
T collectionB) |
static <T extends Collection<E>,E> |
createNewInstanceOfCollection(Class<T> clazz) |
static <E> Map<GroupKey,List<E>> |
duplicates(Collection<E> collection,
String... properties) |
static <T> Collection<T> |
filter(Collection<T> collection,
Criteria criteria) |
static <E> Map<GroupKey,List<E>> |
group(Collection<E> collection,
String... properties) |
static <E> ArrayList<E> |
newArrayList() |
static <E> ArrayList<E> |
newArrayList(E... elements) |
static <E> ArrayList<E> |
newArrayList(Iterable<? extends E> elements) |
static <E> ArrayList<E> |
newArrayListWithCapacity(int initialArraySize) |
static <E> HashSet<E> |
newHashSet() |
static <E> HashSet<E> |
newHashSet(E... elements) |
static <E> HashSet<E> |
newHashSetWithInitialCapacity(int initialCapacity) |
static <E> LinkedHashSet<E> |
newLinkedHashSet() |
static <E> LinkedHashSet<E> |
newLinkedHashSet(E... elements) |
static <E> LinkedHashSet<E> |
newLinkedHashSetWithInitialCapacity(int initialCapacity) |
static <E> LinkedList<E> |
newLinkedList() |
static <E> LinkedList<E> |
newLinkedList(E... elements) |
static <E> LinkedList<E> |
newLinkedList(Iterable<? extends E> elements) |
static <E> TreeSet<E> |
newTreeSet(Comparator<? super E> comparator) |
static <E extends Comparable<?>> |
newTreeSet(E... elements) |
static <E extends Comparable<?>> |
newTreeSet(Iterable<? extends E> elements) |
static <T> Pagination<T> |
paginate(Collection<T> collection,
int page,
int resultsPerPage) |
static <T extends Collection<E>,E> |
truncate(T collection,
int to) |
static <T extends Collection<E>,E> |
truncate(T collection,
int from,
int to) |
static <E,T extends Collection<E>> |
uniques(T collection,
String... properties) |
public static <T> Collection<T> filter(Collection<T> collection, Criteria criteria)
public static <T extends Collection<E>,E> T truncate(T collection, int to)
public static <T extends Collection<E>,E> T truncate(T collection, int from, int to)
public static <T extends Collection<E>,E> T createNewInstanceOfCollection(Class<T> clazz)
public static <T> Pagination<T> paginate(Collection<T> collection, int page, int resultsPerPage)
public static <T> ChoppedElements<T> chopElements(Collection<T> collection, int resultsPerPage)
public static <E> Map<GroupKey,List<E>> group(Collection<E> collection, String... properties)
public static <E> Map<GroupKey,List<E>> duplicates(Collection<E> collection, String... properties)
public static <E,T extends Collection<E>> T uniques(T collection, String... properties)
public static <T extends Collection<?>> boolean containsAny(T collectionA, T collectionB)
public static <E,T extends Collection<E>> boolean containsAny(T collection, E[] elements)
public static <E> ArrayList<E> newArrayList()
@SafeVarargs public static <E> ArrayList<E> newArrayList(E... elements)
public static <E> ArrayList<E> newArrayListWithCapacity(int initialArraySize)
public static <E> LinkedList<E> newLinkedList()
@SafeVarargs public static <E> LinkedList<E> newLinkedList(E... elements)
public static <E> LinkedList<E> newLinkedList(Iterable<? extends E> elements)
public static <E> HashSet<E> newHashSet()
@SafeVarargs public static <E> HashSet<E> newHashSet(E... elements)
public static <E> HashSet<E> newHashSetWithInitialCapacity(int initialCapacity)
public static <E> LinkedHashSet<E> newLinkedHashSet()
@SafeVarargs public static <E> LinkedHashSet<E> newLinkedHashSet(E... elements)
public static <E> LinkedHashSet<E> newLinkedHashSetWithInitialCapacity(int initialCapacity)
@SafeVarargs public static <E extends Comparable<?>> TreeSet<E> newTreeSet(E... elements)
public static <E extends Comparable<?>> TreeSet<E> newTreeSet(Iterable<? extends E> elements)
public static <E> TreeSet<E> newTreeSet(Comparator<? super E> comparator)
Copyright © 2015 jsolve. All rights reserved.