Package com.atlassian.jira.util.collect
Class EnclosedIterable.Functions
java.lang.Object
com.atlassian.jira.util.collect.EnclosedIterable.Functions
- Enclosing interface:
- EnclosedIterable<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidapply(EnclosedIterable<T> iterable, Consumer<T> sink) Pass all the elements of the iterable to the suppliedConsumer.static <I,O> List<O> toList(EnclosedIterable<I> iterable, Function<I, O> transformer) Get anArrayListof the contents of the suppliedEnclosedIterabletransformed by the supplied transform function into the new type O.static <T> List<T>toList(EnclosedIterable<T> iterable) Get anArrayListof the contents of the suppliedEnclosedIterable
-
Constructor Details
-
Functions
public Functions()
-
-
Method Details
-
apply
Pass all the elements of the iterable to the suppliedConsumer. Guarantees that the iterator used will be closed correctly- Parameters:
iterable- containing elements of type Tsink- that will consume the elements
-
toList
Get anArrayListof the contents of the suppliedEnclosedIterable- Returns:
- a mutable
ArrayListcontaining all elements of the iterable.
-
toList
Get anArrayListof the contents of the suppliedEnclosedIterabletransformed by the supplied transform function into the new type O.- Returns:
- a mutable
ArrayListcontaining all elements of the iterable.
-