public interface BooleanIterable
extends java.lang.Iterable<java.lang.Boolean>
Iterable that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
default <E> ObjectIterable<E> |
arrayflatMap(BooleanFunction<E[]> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default BooleanAsyncBuilder |
asAsync()
Creates a Async Builder for moving work of the thread.
|
default int |
count(BooleanPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
default BooleanIterable |
distinct()
A Helper function to reduce the usage of Streams and allows to filter out duplicated elements
|
default BooleanIterable |
filter(BooleanPredicate filter)
A Helper function to reduce the usage of Streams and allows to filter out unwanted elements
|
default boolean |
findFirst(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
default <E,V extends java.lang.Iterable<E>> |
flatMap(BooleanFunction<V> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default void |
forEach(BooleanConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
default void |
forEach(java.util.function.Consumer<? super java.lang.Boolean> action)
Deprecated.
Please use the corresponding type-specific function instead.
|
default <E> void |
forEach(E input,
ObjectBooleanConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
default void |
forEachIndexed(IntBooleanConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
BooleanIterator |
iterator()
Returns an iterator over elements of type
T. |
default BooleanIterable |
limit(long limit)
A Helper function to reduce the usage of Streams and allows to limit the amount of elements
|
default <E> ObjectIterable<E> |
map(BooleanFunction<E> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default boolean |
matchesAll(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
default boolean |
matchesAny(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
default boolean |
matchesNone(BooleanPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
default BooleanIterable |
peek(BooleanConsumer action)
A Helper function to reduce the usage of Streams and allows to preview elements before they are iterated through
|
default <E extends BooleanCollection> |
pour(E collection)
A Helper function to reduce the usage of Streams and allows to collect all elements
|
default BooleanList |
pourAsList()
A Helper function that reduces the usage of streams and allows to collect all elements as a ArrayList
|
default boolean |
reduce(boolean identity,
BooleanBooleanUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
default boolean |
reduce(BooleanBooleanUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
default BooleanIterable |
repeat(int repeats)
A Helper function to reduce the usage of Streams and allows to repeat elements a desired amount of times
|
default BooleanIterable |
sorted(BooleanComparator sorter)
A Helper function to reduce the usage of Streams and allows to sort the elements
|
default BooleanSplititerator |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
default boolean[] |
toBooleanArray()
A Helper function that reduces the usage of streams and allows to collect all elements as a Array
|
BooleanIterator iterator()
T.iterator in interface java.lang.Iterable<java.lang.Boolean>default void forEach(BooleanConsumer action)
action - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nullIterable.forEach(Consumer)The default implementation behaves as if:
iterator().forEachRemaining(action);
@Deprecated default void forEach(java.util.function.Consumer<? super java.lang.Boolean> action)
This default implementation delegates to the corresponding type-specific function.
forEach in interface java.lang.Iterable<java.lang.Boolean>default void forEachIndexed(IntBooleanConsumer action)
action - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nulldefault <E> void forEach(E input,
ObjectBooleanConsumer<E> action)
E - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nulldefault BooleanSplititerator spliterator()
spliterator in interface java.lang.Iterable<java.lang.Boolean>default BooleanAsyncBuilder asAsync()
BooleanAsyncBuilderdefault <E> ObjectIterable<E> map(BooleanFunction<E> mapper)
E - The return type.mapper - the mapping functiondefault <E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(BooleanFunction<V> mapper)
V - The return type supplier.E - The return type.mapper - the flatMapping functiondefault <E> ObjectIterable<E> arrayflatMap(BooleanFunction<E[]> mapper)
E - The return type.mapper - the flatMapping functiondefault BooleanIterable filter(BooleanPredicate filter)
filter - the elements that should be kept.default BooleanIterable distinct()
default BooleanIterable repeat(int repeats)
repeats - how many times the elements should be repeateddefault BooleanIterable limit(long limit)
limit - the amount of elements it should be limited todefault BooleanIterable sorted(BooleanComparator sorter)
sorter - that sorts the elements.default BooleanIterable peek(BooleanConsumer action)
action - the action that should be applieddefault <E extends BooleanCollection> E pour(E collection)
E - the collection typecollection - that the elements should be inserted todefault BooleanList pourAsList()
default boolean[] toBooleanArray()
default boolean matchesAny(BooleanPredicate filter)
filter - that should be applieddefault boolean matchesNone(BooleanPredicate filter)
filter - that should be applieddefault boolean matchesAll(BooleanPredicate filter)
filter - that should be applieddefault boolean findFirst(BooleanPredicate filter)
filter - that should be applieddefault boolean reduce(boolean identity,
BooleanBooleanUnaryOperator operator)
operator - the operation that should be appliedidentity - the start valuedefault boolean reduce(BooleanBooleanUnaryOperator operator)
operator - the operation that should be applieddefault int count(BooleanPredicate filter)
filter - that should be applied