com.atlassian.jira.util.collect
Class EnclosedIterable.Functions
java.lang.Object
com.atlassian.jira.util.collect.EnclosedIterable.Functions
- Enclosing interface:
- EnclosedIterable<T>
public static class EnclosedIterable.Functions
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnclosedIterable.Functions
public EnclosedIterable.Functions()
apply
public static <T> void apply(EnclosedIterable<T> iterable,
Consumer<T> sink)
- Pass all the elements of the iterable to the supplied
Consumer
. Guarantees that the iterator used will be
closed correctly
- Parameters:
iterable
- containing elements of type Tsink
- that will consume the elements
toList
public static <T> List<T> toList(EnclosedIterable<T> iterable)
- Get an
ArrayList
of the contents of the supplied EnclosedIterable
- Returns:
- a mutable
ArrayList
containing all elements of the iterable.
toList
public 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.
- Returns:
- a mutable
ArrayList
containing all elements of the iterable.
Copyright © 2002-2014 Atlassian. All Rights Reserved.