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