public class CollectionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
equalsUnorderedSet(Collection<T> coll1,
Collection<T> coll2)
INTERNAL: Compares two collections to see if they contain the same
elements.
|
static <T> T |
getFirst(Collection<T> coll)
INTERNAL: Gets the first object in the collection.
|
static <T> T |
getFirstElement(Collection<T> coll)
INTERNAL: Gets the first object in the collection.
|
static <T> T |
getRandom(Collection<T> coll)
INTERNAL: Gets a random object from the collection.
|
static <T> List<T> |
nextBatch(Iterator<T> iter,
int length)
EXPERIMENTAL: Iterates over up to length number of
elements in the iterator and returns those elements as a
Collection.
|
public static <T> T getFirst(Collection<T> coll)
public static <T> T getFirstElement(Collection<T> coll)
public static <T> T getRandom(Collection<T> coll)
public static <T> boolean equalsUnorderedSet(Collection<T> coll1, Collection<T> coll2)