public final class CollectionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <E> E |
first(Collection<E> collection)
Return first entry of collection
|
static <E> E |
last(List<E> collection)
Return last entry of collection
|
static <E> E |
random(Collection<E> collection) |
static <E> E |
random(Collection<E> collection,
E... except) |
static <E> E |
random(E[] elements) |
static <E> E |
random(E[] values,
E... except) |
static <E> List<E> |
randomList(Collection<E> collection) |
static <E> List<E> |
randomList(E[] elements) |
public static <E> List<E> randomList(Collection<E> collection)
public static <E> List<E> randomList(E[] elements)
public static <E> E random(E[] elements)
public static <E> E random(Collection<E> collection)
public static <E> E random(E[] values,
E... except)
public static <E> E random(Collection<E> collection, E... except)
public static <E> E first(Collection<E> collection)
E - required typecollection - may be nullpublic static <E> E last(List<E> collection)
E - required typecollection - may be nullCopyright © 2018 Mario Tema. All rights reserved.