public static class EnclosedIterable.Functions extends Object
Constructor and Description |
---|
Functions() |
Modifier and Type | Method and Description |
---|---|
static <T> void |
apply(EnclosedIterable<T> iterable,
Consumer<T> sink)
Pass all the elements of the iterable to the supplied
Consumer . |
static <I,O> List<O> |
toList(EnclosedIterable<I> iterable,
Function<I,O> transformer)
Get an
ArrayList of the contents of the supplied EnclosedIterable
transformed by the supplied transform function into the new type O. |
static <T> List<T> |
toList(EnclosedIterable<T> iterable)
Get an
ArrayList of the contents of the supplied EnclosedIterable |
public static <T> void apply(EnclosedIterable<T> iterable, Consumer<T> sink)
Consumer
. Guarantees that the iterator used will be
closed correctlyiterable
- containing elements of type Tsink
- that will consume the elementspublic static <T> List<T> toList(EnclosedIterable<T> iterable)
ArrayList
of the contents of the supplied EnclosedIterable
ArrayList
containing all elements of the iterable.public static <I,O> List<O> toList(EnclosedIterable<I> iterable, Function<I,O> transformer)
ArrayList
of the contents of the supplied EnclosedIterable
transformed by the supplied transform function into the new type O.ArrayList
containing all elements of the iterable.Copyright © 2002-2019 Atlassian. All Rights Reserved.