public class ObjectIterables
extends java.lang.Object
| Constructor and Description |
|---|
ObjectIterables() |
| Modifier and Type | Method and Description |
|---|---|
static <T,E> ObjectIterable<E> |
arrayFlatMap(java.lang.Iterable<? extends T> iterable,
Object2ObjectFunction<T,E[]> mapper)
A Helper function that flatMaps a Java-Iterable into a new Type.
|
static <T,E> ObjectIterable<E> |
arrayFlatMap(ObjectIterable<T> iterable,
Object2ObjectFunction<T,E[]> mapper)
A Helper function that flatMaps a Iterable into a new Type.
|
static <T> ObjectIterable<T> |
distinct(java.lang.Iterable<? extends T> iterable)
A Helper function that filters out all duplicated elements from a Java Iterable.
|
static <T> ObjectIterable<T> |
distinct(ObjectIterable<T> iterable)
A Helper function that filters out all duplicated elements.
|
static <T> ObjectIterable<T> |
filter(java.lang.Iterable<? extends T> iterable,
Object2BooleanFunction<T> filter)
A Helper function that filters out all desired elements from a Java-Iterable
|
static <T> ObjectIterable<T> |
filter(ObjectIterable<T> iterable,
Object2BooleanFunction<T> filter)
A Helper function that filters out all desired elements
|
static <T,E,V extends java.lang.Iterable<E>> |
flatMap(java.lang.Iterable<? extends T> iterable,
Object2ObjectFunction<T,V> mapper)
A Helper function that flatMaps a Java-Iterable into a new Type.
|
static <T,E,V extends java.lang.Iterable<E>> |
flatMap(ObjectIterable<T> iterable,
Object2ObjectFunction<T,V> mapper)
A Helper function that flatMaps a Iterable into a new Type.
|
static <T> ObjectIterable<T> |
limit(java.lang.Iterable<? extends T> iterable,
long limit)
A Helper function that hard limits the Iterable to a specific size from a Java Iterable
|
static <T> ObjectIterable<T> |
limit(ObjectIterable<T> iterable,
long limit)
A Helper function that hard limits the Iterable to a specific size
|
static <T,E> ObjectIterable<E> |
map(java.lang.Iterable<? extends T> iterable,
Object2ObjectFunction<T,E> mapper)
A Helper function that maps a Java-Iterable into a new Type.
|
static <T,E> ObjectIterable<E> |
map(ObjectIterable<T> iterable,
Object2ObjectFunction<T,E> mapper)
A Helper function that maps a Iterable into a new Type.
|
static <T> ObjectIterable<T> |
peek(java.lang.Iterable<? extends T> iterable,
java.util.function.Consumer<T> action)
A Helper function that allows to preview the result of a Iterable from a Java Iterable
|
static <T> ObjectIterable<T> |
peek(ObjectIterable<T> iterable,
java.util.function.Consumer<T> action)
A Helper function that allows to preview the result of a Iterable.
|
static <T> ObjectIterable<T> |
sorted(java.lang.Iterable<? extends T> iterable,
java.util.Comparator<T> sorter)
A Helper function that sorts the Iterable from a Java Iterable
This operation is heavily hurting performance because it rebuilds the entire iterator and then sorts it.
|
static <T> ObjectIterable<T> |
sorted(ObjectIterable<T> iterable,
java.util.Comparator<T> sorter)
A Helper function that sorts the Iterable.
|
static <T> ObjectIterable<T> |
wrap(java.lang.Iterable<? extends T> iterable)
A Wrapper function that wraps a Java-Iterable into a Type Specific Iterable
|
public static <T,E> ObjectIterable<E> map(java.lang.Iterable<? extends T> iterable, Object2ObjectFunction<T,E> mapper)
T - the type of elements maintained by this CollectionE - The return type.iterable - the iterable that should be mappedmapper - the function that decides what the result turns into.public static <T,E> ObjectIterable<E> map(ObjectIterable<T> iterable, Object2ObjectFunction<T,E> mapper)
T - the type of elements maintained by this CollectionE - The return type.iterable - the iterable that should be mappedmapper - the function that decides what the result turns into.public static <T,E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(java.lang.Iterable<? extends T> iterable, Object2ObjectFunction<T,V> mapper)
T - the type of elements maintained by this CollectionV - The return type supplier.E - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static <T,E,V extends java.lang.Iterable<E>> ObjectIterable<E> flatMap(ObjectIterable<T> iterable, Object2ObjectFunction<T,V> mapper)
T - the type of elements maintained by this CollectionV - The return type supplier.E - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static <T,E> ObjectIterable<E> arrayFlatMap(java.lang.Iterable<? extends T> iterable, Object2ObjectFunction<T,E[]> mapper)
T - the type of elements maintained by this CollectionE - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static <T,E> ObjectIterable<E> arrayFlatMap(ObjectIterable<T> iterable, Object2ObjectFunction<T,E[]> mapper)
T - the type of elements maintained by this CollectionE - The return type.iterable - the iterable that should be flatMappedmapper - the function that decides what the result turns into.public static <T> ObjectIterable<T> filter(java.lang.Iterable<? extends T> iterable, Object2BooleanFunction<T> filter)
T - the type of elements maintained by this Collectioniterable - that should be filtered.filter - the filter that decides that should be let throughpublic static <T> ObjectIterable<T> filter(ObjectIterable<T> iterable, Object2BooleanFunction<T> filter)
T - the type of elements maintained by this Collectioniterable - that should be filtered.filter - the filter that decides that should be let throughpublic static <T> ObjectIterable<T> distinct(ObjectIterable<T> iterable)
T - the type of elements maintained by this Collectioniterable - that should be distinctpublic static <T> ObjectIterable<T> distinct(java.lang.Iterable<? extends T> iterable)
T - the type of elements maintained by this Collectioniterable - that should be distinctpublic static <T> ObjectIterable<T> limit(ObjectIterable<T> iterable, long limit)
T - the type of elements maintained by this Collectioniterable - that should be limitedlimit - the amount of elements it should be limited topublic static <T> ObjectIterable<T> limit(java.lang.Iterable<? extends T> iterable, long limit)
T - the type of elements maintained by this Collectioniterable - that should be limitedlimit - the amount of elements it should be limited topublic static <T> ObjectIterable<T> sorted(ObjectIterable<T> iterable, java.util.Comparator<T> sorter)
T - the type of elements maintained by this Collectioniterable - that should be sortedsorter - that sorts the iterable. Can be null.public static <T> ObjectIterable<T> sorted(java.lang.Iterable<? extends T> iterable, java.util.Comparator<T> sorter)
T - the type of elements maintained by this Collectioniterable - that should be sortedsorter - that sorts the iterable. Can be null.public static <T> ObjectIterable<T> peek(ObjectIterable<T> iterable, java.util.function.Consumer<T> action)
T - the type of elements maintained by this Collectioniterable - that should be peeked ataction - callback that receives the value before the iterable returns itpublic static <T> ObjectIterable<T> peek(java.lang.Iterable<? extends T> iterable, java.util.function.Consumer<T> action)
T - the type of elements maintained by this Collectioniterable - that should be peeked ataction - callback that receives the value before the iterable returns itpublic static <T> ObjectIterable<T> wrap(java.lang.Iterable<? extends T> iterable)
T - the type of elements maintained by this Collectioniterable - that should be wrapped