public interface ShortIterable
extends java.lang.Iterable<java.lang.Short>
Iterable that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
default <E> ObjectIterable<E> |
arrayflatMap(ShortFunction<E[]> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default ShortAsyncBuilder |
asAsync()
Creates a Async Builder for moving work of the thread.
|
default int |
count(ShortPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
default ShortIterable |
distinct()
A Helper function to reduce the usage of Streams and allows to filter out duplicated elements
|
default ShortIterable |
filter(ShortPredicate filter)
A Helper function to reduce the usage of Streams and allows to filter out unwanted elements
|
default short |
findFirst(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
default <E,V extends java.lang.Iterable<E>> |
flatMap(ShortFunction<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.Short> action)
Deprecated.
Please use the corresponding type-specific function instead.
|
default <E> void |
forEach(E input,
ObjectShortConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
default void |
forEach(ShortConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
default void |
forEachIndexed(IntShortConsumer action)
A Indexed forEach implementation that allows you to keep track of how many elements were already iterated over.
|
ShortIterator |
iterator()
Returns an iterator over elements of type
T. |
default ShortIterable |
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(ShortFunction<E> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default boolean |
matchesAll(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
default boolean |
matchesAny(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
default boolean |
matchesNone(ShortPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
default ShortIterable |
peek(ShortConsumer action)
A Helper function to reduce the usage of Streams and allows to preview elements before they are iterated through
|
default <E extends ShortCollection> |
pour(E collection)
A Helper function to reduce the usage of Streams and allows to collect all elements
|
default ShortList |
pourAsList()
A Helper function that reduces the usage of streams and allows to collect all elements as a ArrayList
|
default ShortSet |
pourAsSet()
A Helper function that reduces the usage of streams and allows to collect all elements as a LinkedHashSet
|
default short |
reduce(short identity,
ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
default short |
reduce(ShortShortUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
default ShortIterable |
repeat(int repeats)
A Helper function to reduce the usage of Streams and allows to repeat elements a desired amount of times
|
default ShortIterable |
sorted(ShortComparator sorter)
A Helper function to reduce the usage of Streams and allows to sort the elements
|
default ShortSplititerator |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
default short[] |
toShortArray()
A Helper function that reduces the usage of streams and allows to collect all elements as a Array
|
ShortIterator iterator()
T.iterator in interface java.lang.Iterable<java.lang.Short>default void forEach(ShortConsumer 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.Short> action)
This default implementation delegates to the corresponding type-specific function.
forEach in interface java.lang.Iterable<java.lang.Short>default void forEachIndexed(IntShortConsumer action)
action - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nulldefault <E> void forEach(E input,
ObjectShortConsumer<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 ShortSplititerator spliterator()
spliterator in interface java.lang.Iterable<java.lang.Short>default ShortAsyncBuilder asAsync()
ShortAsyncBuilderdefault <E> ObjectIterable<E> map(ShortFunction<E> mapper)
E - The return type.mapper - the mapping functiondefault <E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(ShortFunction<V> mapper)
V - The return type supplier.E - The return type.mapper - the flatMapping functiondefault <E> ObjectIterable<E> arrayflatMap(ShortFunction<E[]> mapper)
E - The return type.mapper - the flatMapping functiondefault ShortIterable filter(ShortPredicate filter)
filter - the elements that should be kept.default ShortIterable distinct()
default ShortIterable repeat(int repeats)
repeats - how many times the elements should be repeateddefault ShortIterable limit(long limit)
limit - the amount of elements it should be limited todefault ShortIterable sorted(ShortComparator sorter)
sorter - that sorts the elements.default ShortIterable peek(ShortConsumer action)
action - the action that should be applieddefault <E extends ShortCollection> E pour(E collection)
E - the collection typecollection - that the elements should be inserted todefault ShortList pourAsList()
default ShortSet pourAsSet()
default short[] toShortArray()
default boolean matchesAny(ShortPredicate filter)
filter - that should be applieddefault boolean matchesNone(ShortPredicate filter)
filter - that should be applieddefault boolean matchesAll(ShortPredicate filter)
filter - that should be applieddefault short findFirst(ShortPredicate filter)
filter - that should be applieddefault short reduce(short identity,
ShortShortUnaryOperator operator)
operator - the operation that should be appliedidentity - the start valuedefault short reduce(ShortShortUnaryOperator operator)
operator - the operation that should be applieddefault int count(ShortPredicate filter)
filter - that should be applied