T - the type of elements maintained by this Collectionpublic interface ObjectIterable<T>
extends java.lang.Iterable<T>
Iterable that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
default <E> ObjectIterable<E> |
arrayflatMap(Object2ObjectFunction<T,E[]> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default ObjectAsyncBuilder<T> |
asAsync()
Creates a Async Builder for moving work of the thread.
|
default int |
count(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
default ObjectIterable<T> |
distinct()
A Helper function to reduce the usage of Streams and allows to filter out duplicated elements
|
default ObjectIterable<T> |
filter(Object2BooleanFunction<T> filter)
A Helper function to reduce the usage of Streams and allows to filter out unwanted elements
|
default T |
findFirst(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
default <E,V extends java.lang.Iterable<E>> |
flatMap(Object2ObjectFunction<T,V> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default <E> void |
forEach(E input,
ObjectObjectConsumer<E,T> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
ObjectIterator<T> |
iterator()
Returns an iterator over elements of type
T. |
default ObjectIterable<T> |
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(Object2ObjectFunction<T,E> mapper)
A Helper function to reduce the usage of Streams and allows to convert a Iterable to something else.
|
default boolean |
matchesAll(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
default boolean |
matchesAny(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
default boolean |
matchesNone(Object2BooleanFunction<T> filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
default ObjectIterable<T> |
peek(java.util.function.Consumer<T> action)
A Helper function to reduce the usage of Streams and allows to preview elements before they are iterated through
|
default <E extends ObjectCollection<T>> |
pour(E collection)
A Helper function to reduce the usage of Streams and allows to collect all elements
|
default ObjectList<T> |
pourAsList()
A Helper function that reduces the usage of streams and allows to collect all elements as a ArrayList
|
default ObjectSet<T> |
pourAsSet()
A Helper function that reduces the usage of streams and allows to collect all elements as a LinkedHashSet
|
default <E> E |
reduce(E identity,
java.util.function.BiFunction<E,T,E> operator)
Performs a reduction on the
elements of this Iterable
|
default T |
reduce(ObjectObjectUnaryOperator<T,T> operator)
Performs a reduction on the
elements of this Iterable
|
default ObjectIterable<T> |
sorted(java.util.Comparator<T> sorter)
A Helper function to reduce the usage of Streams and allows to sort the elements
|
default ObjectSplititerator<T> |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
ObjectIterator<T> iterator()
T.iterator in interface java.lang.Iterable<T>default <E> void forEach(E input,
ObjectObjectConsumer<E,T> 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 ObjectSplititerator<T> spliterator()
spliterator in interface java.lang.Iterable<T>default ObjectAsyncBuilder<T> asAsync()
ObjectAsyncBuilderdefault <E> ObjectIterable<E> map(Object2ObjectFunction<T,E> mapper)
E - The return type.mapper - the mapping functiondefault <E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(Object2ObjectFunction<T,V> mapper)
V - The return type supplier.E - The return type.mapper - the flatMapping functiondefault <E> ObjectIterable<E> arrayflatMap(Object2ObjectFunction<T,E[]> mapper)
E - The return type.mapper - the flatMapping functiondefault ObjectIterable<T> filter(Object2BooleanFunction<T> filter)
filter - the elements that should be kept.default ObjectIterable<T> distinct()
default ObjectIterable<T> limit(long limit)
limit - the amount of elements it should be limited todefault ObjectIterable<T> sorted(java.util.Comparator<T> sorter)
sorter - that sorts the elements.default ObjectIterable<T> peek(java.util.function.Consumer<T> action)
action - the action that should be applieddefault <E extends ObjectCollection<T>> E pour(E collection)
E - the collection typecollection - that the elements should be inserted todefault ObjectList<T> pourAsList()
default ObjectSet<T> pourAsSet()
default boolean matchesAny(Object2BooleanFunction<T> filter)
filter - that should be applieddefault boolean matchesNone(Object2BooleanFunction<T> filter)
filter - that should be applieddefault boolean matchesAll(Object2BooleanFunction<T> filter)
filter - that should be applieddefault T findFirst(Object2BooleanFunction<T> filter)
filter - that should be applieddefault <E> E reduce(E identity,
java.util.function.BiFunction<E,T,E> operator)
E - the type of elements maintained by this Collectionoperator - the operation that should be appliedidentity - the start valuedefault T reduce(ObjectObjectUnaryOperator<T,T> operator)
operator - the operation that should be applieddefault int count(Object2BooleanFunction<T> filter)
filter - that should be applied