public class Iterables
extends java.lang.Object
| Constructor and Description |
|---|
Iterables() |
| Modifier and Type | Method and Description |
|---|---|
static <F,T> java.util.List<T> |
map(java.lang.Iterable<F> iterable,
java.util.function.Function<F,T> mapper)
Map an iterable to a list using the provided mapper function.
|
static <T> java.util.Collection<T> |
toCollection(java.lang.Iterable<T> iterable)
Convert an iterable to a collection.
|
public static <T> java.util.Collection<T> toCollection(java.lang.Iterable<T> iterable)
T - The type of the elements in the iterableiterable - The iterable to convert to a collectionpublic static <F,T> java.util.List<T> map(java.lang.Iterable<F> iterable,
java.util.function.Function<F,T> mapper)
F - The type of the elements in the iterableT - The type of the elements in the resulting listiterable - The iterable to mapmapper - The function to map each element of the iterable