public interface IntIterable
extends java.lang.Iterable<java.lang.Integer>
Iterable that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
default <E> ObjectIterable<E> |
arrayflatMap(Int2ObjectFunction<E[]> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default IntAsyncBuilder |
asAsync()
Creates a Async Builder for moving work of the thread.
|
default int |
count(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
default IntIterable |
distinct()
A Helper function to reduce the usage of Streams and allows to filter out duplicated elements
|
default IntIterable |
filter(Int2BooleanFunction filter)
A Helper function to reduce the usage of Streams and allows to filter out unwanted elements
|
default int |
findFirst(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
default <E,V extends java.lang.Iterable<E>> |
flatMap(Int2ObjectFunction<V> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default void |
forEach(java.util.function.Consumer<? super java.lang.Integer> action)
Deprecated.
Please use the corresponding type-specific function instead.
|
default <E> void |
forEach(E input,
ObjectIntConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
default void |
forEach(IntConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
IntIterator |
iterator()
Returns an iterator over elements of type
T. |
default IntIterable |
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(Int2ObjectFunction<E> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default boolean |
matchesAll(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
default boolean |
matchesAny(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
default boolean |
matchesNone(Int2BooleanFunction filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
default IntIterable |
peek(IntConsumer action)
A Helper function to reduce the usage of Streams and allows to preview elements before they are iterated through
|
default <E extends IntCollection> |
pour(E collection)
A Helper function to reduce the usage of Streams and allows to collect all elements
|
default IntList |
pourAsList()
A Helper function that reduces the usage of streams and allows to collect all elements as a ArrayList
|
default IntSet |
pourAsSet()
A Helper function that reduces the usage of streams and allows to collect all elements as a LinkedHashSet
|
default int |
reduce(int identity,
IntIntUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
default int |
reduce(IntIntUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
default IntIterable |
sorted(IntComparator sorter)
A Helper function to reduce the usage of Streams and allows to sort the elements
|
default IntSplititerator |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
IntIterator iterator()
T.iterator in interface java.lang.Iterable<java.lang.Integer>default void forEach(IntConsumer 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.Integer> action)
This default implementation delegates to the corresponding type-specific function.
forEach in interface java.lang.Iterable<java.lang.Integer>default <E> void forEach(E input,
ObjectIntConsumer<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 IntSplititerator spliterator()
spliterator in interface java.lang.Iterable<java.lang.Integer>default IntAsyncBuilder asAsync()
IntAsyncBuilderdefault <E> ObjectIterable<E> map(Int2ObjectFunction<E> mapper)
E - The return type.mapper - the mapping functiondefault <E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(Int2ObjectFunction<V> mapper)
V - The return type supplier.E - The return type.mapper - the flatMapping functiondefault <E> ObjectIterable<E> arrayflatMap(Int2ObjectFunction<E[]> mapper)
E - The return type.mapper - the flatMapping functiondefault IntIterable filter(Int2BooleanFunction filter)
filter - the elements that should be kept.default IntIterable distinct()
default IntIterable limit(long limit)
limit - the amount of elements it should be limited todefault IntIterable sorted(IntComparator sorter)
sorter - that sorts the elements.default IntIterable peek(IntConsumer action)
action - the action that should be applieddefault <E extends IntCollection> E pour(E collection)
E - the collection typecollection - that the elements should be inserted todefault IntList pourAsList()
default IntSet pourAsSet()
default boolean matchesAny(Int2BooleanFunction filter)
filter - that should be applieddefault boolean matchesNone(Int2BooleanFunction filter)
filter - that should be applieddefault boolean matchesAll(Int2BooleanFunction filter)
filter - that should be applieddefault int findFirst(Int2BooleanFunction filter)
filter - that should be applieddefault int reduce(int identity,
IntIntUnaryOperator operator)
operator - the operation that should be appliedidentity - the start valuedefault int reduce(IntIntUnaryOperator operator)
operator - the operation that should be applieddefault int count(Int2BooleanFunction filter)
filter - that should be applied