public class BooleanIterables
extends java.lang.Object
| Constructor and Description |
|---|
BooleanIterables() |
| Modifier and Type | Method and Description |
|---|---|
static <E> ObjectIterable<E> |
arrayFlatMap(BooleanIterable iterable,
BooleanFunction<E[]> mapper)
A Helper function that flatMaps a Iterable into a new Type.
|
static <E> ObjectIterable<E> |
arrayFlatMap(java.lang.Iterable<? extends java.lang.Boolean> iterable,
BooleanFunction<E[]> mapper)
A Helper function that flatMaps a Java-Iterable into a new Type.
|
static BooleanIterable |
distinct(BooleanIterable iterable)
A Helper function that filters out all duplicated elements.
|
static BooleanIterable |
distinct(java.lang.Iterable<? extends java.lang.Boolean> iterable)
A Helper function that filters out all duplicated elements from a Java Iterable.
|
static BooleanIterable |
filter(BooleanIterable iterable,
BooleanPredicate filter)
A Helper function that filters out all desired elements
|
static BooleanIterable |
filter(java.lang.Iterable<? extends java.lang.Boolean> iterable,
BooleanPredicate filter)
A Helper function that filters out all desired elements from a Java-Iterable
|
static <E,V extends java.lang.Iterable<E>> |
flatMap(BooleanIterable iterable,
BooleanFunction<V> mapper)
A Helper function that flatMaps a Iterable into a new Type.
|
static <E,V extends java.lang.Iterable<E>> |
flatMap(java.lang.Iterable<? extends java.lang.Boolean> iterable,
BooleanFunction<V> mapper)
A Helper function that flatMaps a Java-Iterable into a new Type.
|
static BooleanIterable |
limit(BooleanIterable iterable,
long limit)
A Helper function that hard limits the Iterable to a specific size
|
static BooleanIterable |
limit(java.lang.Iterable<? extends java.lang.Boolean> iterable,
long limit)
A Helper function that hard limits the Iterable to a specific size from a Java Iterable
|
static <E> ObjectIterable<E> |
map(BooleanIterable iterable,
BooleanFunction<E> mapper)
A Helper function that maps a Iterable into a new Type.
|
static <E> ObjectIterable<E> |
map(java.lang.Iterable<? extends java.lang.Boolean> iterable,
BooleanFunction<E> mapper)
A Helper function that maps a Java-Iterable into a new Type.
|
static BooleanIterable |
peek(BooleanIterable iterable,
BooleanConsumer action)
A Helper function that allows to preview the result of a Iterable.
|
static BooleanIterable |
peek(java.lang.Iterable<? extends java.lang.Boolean> iterable,
BooleanConsumer action)
A Helper function that allows to preview the result of a Iterable from a Java Iterable
|
static BooleanIterable |
repeat(BooleanIterable iterable,
int repeats)
A Helper function that repeats the Iterable a specific amount of times
|
static BooleanIterable |
repeat(java.lang.Iterable<? extends java.lang.Boolean> iterable,
int repeats)
A Helper function that repeats the Iterable a specific amount of times from a Java Iterable
|
static BooleanIterable |
sorted(BooleanIterable iterable,
BooleanComparator sorter)
A Helper function that sorts the Iterable.
|
static BooleanIterable |
sorted(java.lang.Iterable<? extends java.lang.Boolean> iterable,
BooleanComparator sorter)
A Helper function that sorts the Iterable from a Java Iterable
This operation is heavily hurting performance because it rebuilds the entire iterator and then sorts it.
|
static BooleanIterable |
wrap(java.lang.Iterable<? extends java.lang.Boolean> iterable)
A Wrapper function that wraps a Java-Iterable into a Type Specific Iterable
|
public static <E> ObjectIterable<E> map(java.lang.Iterable<? extends java.lang.Boolean> iterable, BooleanFunction<E> mapper)
E - The return type.iterable - the iterable that should be mappedmapper - the function that decides what the result turns into.public static <E> ObjectIterable<E> map(BooleanIterable iterable, BooleanFunction<E> mapper)
E - The return type.iterable - the iterable that should be mappedmapper - the function that decides what the result turns into.public static <E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(java.lang.Iterable<? extends java.lang.Boolean> iterable, BooleanFunction<V> mapper)
V - The return type supplier.E - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static <E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(BooleanIterable iterable, BooleanFunction<V> mapper)
V - The return type supplier.E - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static <E> ObjectIterable<E> arrayFlatMap(java.lang.Iterable<? extends java.lang.Boolean> iterable, BooleanFunction<E[]> mapper)
E - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static <E> ObjectIterable<E> arrayFlatMap(BooleanIterable iterable, BooleanFunction<E[]> mapper)
E - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static BooleanIterable filter(java.lang.Iterable<? extends java.lang.Boolean> iterable, BooleanPredicate filter)
iterable - that should be filtered.filter - the filter that decides that should be let throughpublic static BooleanIterable filter(BooleanIterable iterable, BooleanPredicate filter)
iterable - that should be filtered.filter - the filter that decides that should be let throughpublic static BooleanIterable distinct(BooleanIterable iterable)
iterable - that should be distinctpublic static BooleanIterable distinct(java.lang.Iterable<? extends java.lang.Boolean> iterable)
iterable - that should be distinctpublic static BooleanIterable repeat(BooleanIterable iterable, int repeats)
iterable - that should be repeatedrepeats - the amount of times the iterable should be repeatedpublic static BooleanIterable repeat(java.lang.Iterable<? extends java.lang.Boolean> iterable, int repeats)
iterable - that should be repeatedrepeats - the amount of times the iterable should be repeatedpublic static BooleanIterable limit(BooleanIterable iterable, long limit)
iterable - that should be limitedlimit - the amount of elements it should be limited topublic static BooleanIterable limit(java.lang.Iterable<? extends java.lang.Boolean> iterable, long limit)
iterable - that should be limitedlimit - the amount of elements it should be limited topublic static BooleanIterable sorted(BooleanIterable iterable, BooleanComparator sorter)
iterable - that should be sortedsorter - that sorts the iterable. Can be null.public static BooleanIterable sorted(java.lang.Iterable<? extends java.lang.Boolean> iterable, BooleanComparator sorter)
iterable - that should be sortedsorter - that sorts the iterable. Can be null.public static BooleanIterable peek(BooleanIterable iterable, BooleanConsumer action)
iterable - that should be peeked ataction - callback that receives the value before the iterable returns itpublic static BooleanIterable peek(java.lang.Iterable<? extends java.lang.Boolean> iterable, BooleanConsumer action)
iterable - that should be peeked ataction - callback that receives the value before the iterable returns itpublic static BooleanIterable wrap(java.lang.Iterable<? extends java.lang.Boolean> iterable)
iterable - that should be wrapped