public final class IterableUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T> CloseableIterable<T> |
concat(Iterable<? extends Iterable<? extends T>> iterables) |
static <T> CloseableIterable<T> |
filter(Iterable<T> iterable,
List<Predicate> predicates)
Filters items out of an iterable.
|
static <T> CloseableIterable<T> |
filter(Iterable<T> iterable,
Predicate predicate)
Filters items out of an iterable.
|
static <T> CloseableIterable<T> |
limit(Iterable<T> iterable,
int start,
Integer end,
boolean truncate) |
static <I_ITEM,O_ITEM> |
map(Iterable<I_ITEM> iterable,
Function function) |
static <I_ITEM,O_ITEM> |
map(Iterable<I_ITEM> iterable,
List<Function> functions) |
public static <T> CloseableIterable<T> filter(Iterable<T> iterable, Predicate predicate)
T
- the type of the items in the iterableiterable
- the items to filterpredicate
- the predicate to applypublic static <T> CloseableIterable<T> filter(Iterable<T> iterable, List<Predicate> predicates)
T
- the type of the items in the iterableiterable
- the items to filterpredicates
- the predicates to applypublic static <I_ITEM,O_ITEM> CloseableIterable<O_ITEM> map(Iterable<I_ITEM> iterable, Function function)
public static <I_ITEM,O_ITEM> CloseableIterable<O_ITEM> map(Iterable<I_ITEM> iterable, List<Function> functions)
public static <T> CloseableIterable<T> concat(Iterable<? extends Iterable<? extends T>> iterables)
public static <T> CloseableIterable<T> limit(Iterable<T> iterable, int start, Integer end, boolean truncate)
Copyright © 2021. All rights reserved.