| Modifier and Type | Method and Description |
|---|---|
static <T> Iterable<T> |
concat(Iterable<? extends Iterable<? extends T>> iterables) |
static <T> Iterable<T> |
concat(Iterable<? extends T>... its) |
static <T> Iterable<T> |
empty() |
static <T,U extends T> |
filterClass(Iterable<T> iterable,
Class<? extends U> clazz) |
static <T> Iterable<T> |
singleton(T elt) |
static <T> int |
size(Iterable<T> it) |
static <T,U> Iterable<U> |
transform(Iterable<? extends T> it,
Function<? super T,? extends U> f) |
public static <T> Iterable<T> empty()
public static <T> Iterable<T> singleton(T elt)
elt - eltpublic static <T> Iterable<T> concat(Iterable<? extends Iterable<? extends T>> iterables)
iterables - Iterable representing the concatenation
of all iterables in iterables, in their relative order@SafeVarargs public static <T> Iterable<T> concat(Iterable<? extends T>... its)
its - Iterable representing the concatenation
of all iterables in its, in their relative orderpublic static <T,U> Iterable<U> transform(Iterable<? extends T> it, Function<? super T,? extends U> f)
it - f - f has been applied to all elements in itpublic static <T,U extends T> Iterable<U> filterClass(Iterable<T> iterable, Class<? extends U> clazz)
iterable - clazz - iterable filtered to only contain elements
of the class whose descriptor is clazzpublic static <T> int size(Iterable<T> it)
it - it