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