java.lang.Object
speiger.src.collections.objects.utils.ObjectIterables
A Helper class for Iterables
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <T,E> ObjectIterable<E> arrayFlatMap(Iterable<? extends T> iterable, UnaryOperator<T, E[]> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.static <T,E> ObjectIterable<E> arrayFlatMap(ObjectIterable<T> iterable, UnaryOperator<T, E[]> mapper) A Helper function that flatMaps a Iterable into a new Type.static <T> ObjectIterable<T>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>A Helper function that filters out all desired elements from a Java-Iterablestatic <T> ObjectIterable<T>filter(ObjectIterable<T> iterable, Predicate<T> filter) A Helper function that filters out all desired elementsstatic <T,E, V extends Iterable<E>>
ObjectIterable<E>flatMap(Iterable<? extends T> iterable, UnaryOperator<T, V> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.static <T,E, V extends Iterable<E>>
ObjectIterable<E>flatMap(ObjectIterable<T> iterable, UnaryOperator<T, V> mapper) A Helper function that flatMaps a Iterable into a new Type.static <T> ObjectIterable<T>A Helper function that hard limits the Iterable to a specific size from a Java Iterablestatic <T> ObjectIterable<T>limit(ObjectIterable<T> iterable, long limit) A Helper function that hard limits the Iterable to a specific sizestatic <T,E> ObjectIterable<E> map(Iterable<? extends T> iterable, UnaryOperator<T, E> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T,E> ObjectIterable<E> map(ObjectIterable<T> iterable, UnaryOperator<T, E> mapper) A Helper function that maps a Iterable into a new Type.static <T> BooleanIterablemapToBoolean(Iterable<? extends T> iterable, Predicate<T> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T> BooleanIterablemapToBoolean(ObjectIterable<T> iterable, Predicate<T> mapper) A Helper function that maps a Iterable into a new Type.static <T> ByteIterablemapToByte(Iterable<? extends T> iterable, ToByteFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T> ByteIterablemapToByte(ObjectIterable<T> iterable, ToByteFunction<T> mapper) A Helper function that maps a Iterable into a new Type.static <T> DoubleIterablemapToDouble(Iterable<? extends T> iterable, ToDoubleFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T> DoubleIterablemapToDouble(ObjectIterable<T> iterable, ToDoubleFunction<T> mapper) A Helper function that maps a Iterable into a new Type.static <T> FloatIterablemapToFloat(Iterable<? extends T> iterable, ToFloatFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T> FloatIterablemapToFloat(ObjectIterable<T> iterable, ToFloatFunction<T> mapper) A Helper function that maps a Iterable into a new Type.static <T> IntIterablemapToInt(Iterable<? extends T> iterable, ToIntFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T> IntIterablemapToInt(ObjectIterable<T> iterable, ToIntFunction<T> mapper) A Helper function that maps a Iterable into a new Type.static <T> LongIterablemapToLong(Iterable<? extends T> iterable, ToLongFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T> LongIterablemapToLong(ObjectIterable<T> iterable, ToLongFunction<T> mapper) A Helper function that maps a Iterable into a new Type.static <T> ShortIterablemapToShort(Iterable<? extends T> iterable, ToShortFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.static <T> ShortIterablemapToShort(ObjectIterable<T> iterable, ToShortFunction<T> mapper) A Helper function that maps a Iterable into a new Type.static <T> ObjectIterable<T>A Helper function that allows to preview the result of a Iterable from a Java Iterablestatic <T> ObjectIterable<T>peek(ObjectIterable<T> iterable, Consumer<T> action) A Helper function that allows to preview the result of a Iterable.static <T> ObjectIterable<T>A Helper function that repeats the Iterable a specific amount of times from a Java Iterablestatic <T> ObjectIterable<T>repeat(ObjectIterable<T> iterable, int repeats) A Helper function that repeats the Iterable a specific amount of timesstatic <T> ObjectIterable<T>sorted(Iterable<? extends T> iterable, 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, Comparator<T> sorter) A Helper function that sorts the Iterable.static <T> ObjectIterable<T>A Wrapper function that wraps a Java-Iterable into a Type Specific Iterable
-
Konstruktordetails
-
ObjectIterables
public ObjectIterables()
-
-
Methodendetails
-
map
public static <T,E> ObjectIterable<E> map(Iterable<? extends T> iterable, UnaryOperator<T, E> mapper) A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this CollectionE- The return type.- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
map
A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this CollectionE- The return type.- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToBoolean
A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToBoolean
A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToByte
A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToByte
A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToShort
public static <T> ShortIterable mapToShort(Iterable<? extends T> iterable, ToShortFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToShort
A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToInt
A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToInt
A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToLong
A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToLong
A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToFloat
public static <T> FloatIterable mapToFloat(Iterable<? extends T> iterable, ToFloatFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToFloat
A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToDouble
public static <T> DoubleIterable mapToDouble(Iterable<? extends T> iterable, ToDoubleFunction<T> mapper) A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
mapToDouble
public static <T> DoubleIterable mapToDouble(ObjectIterable<T> iterable, ToDoubleFunction<T> mapper) A Helper function that maps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- the iterable that should be mappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is mapped to a new result
-
flatMap
public static <T,E, ObjectIterable<E> flatMapV extends Iterable<E>> (Iterable<? extends T> iterable, UnaryOperator<T, V> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this CollectionE- The return type.V- The return type supplier.- Parameter:
iterable- the iterable that should be flatMappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is flatMapped to a new result
-
flatMap
public static <T,E, ObjectIterable<E> flatMapV extends Iterable<E>> (ObjectIterable<T> iterable, UnaryOperator<T, V> mapper) A Helper function that flatMaps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this CollectionE- The return type.V- The return type supplier.- Parameter:
iterable- the iterable that should be flatMappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is flatMapped to a new result
-
arrayFlatMap
public static <T,E> ObjectIterable<E> arrayFlatMap(Iterable<? extends T> iterable, UnaryOperator<T, E[]> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this CollectionE- The return type.- Parameter:
iterable- the iterable that should be flatMappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is flatMapped to a new result
-
arrayFlatMap
public static <T,E> ObjectIterable<E> arrayFlatMap(ObjectIterable<T> iterable, UnaryOperator<T, E[]> mapper) A Helper function that flatMaps a Iterable into a new Type.- Typparameter:
T- the keyType of elements maintained by this CollectionE- The return type.- Parameter:
iterable- the iterable that should be flatMappedmapper- the function that decides what the result turns into.- Gibt zurück:
- a iterable that is flatMapped to a new result
-
filter
A Helper function that filters out all desired elements from a Java-Iterable- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be filtered.filter- the filter that decides that should be let through- Gibt zurück:
- a filtered iterable
-
filter
A Helper function that filters out all desired elements- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be filtered.filter- the filter that decides that should be let through- Gibt zurück:
- a filtered iterable
-
distinct
A Helper function that filters out all duplicated elements.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be distinct- Gibt zurück:
- a distinct iterable
-
distinct
A Helper function that filters out all duplicated elements from a Java Iterable.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be distinct- Gibt zurück:
- a distinct iterable
-
repeat
A Helper function that repeats the Iterable a specific amount of times- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be repeatedrepeats- the amount of times the iterable should be repeated- Gibt zurück:
- a repeating iterable
-
repeat
A Helper function that repeats the Iterable a specific amount of times from a Java Iterable- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be repeatedrepeats- the amount of times the iterable should be repeated- Gibt zurück:
- a repeating iterable
-
limit
A Helper function that hard limits the Iterable to a specific size- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be limitedlimit- the amount of elements it should be limited to- Gibt zurück:
- a limited iterable
-
limit
A Helper function that hard limits the Iterable to a specific size from a Java Iterable- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be limitedlimit- the amount of elements it should be limited to- Gibt zurück:
- a limited iterable
-
sorted
A Helper function that sorts the Iterable. This operation is heavily hurting performance because it rebuilds the entire iterator and then sorts it.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be sortedsorter- that sorts the iterable. Can be null.- Gibt zurück:
- a sorted iterable.
-
sorted
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.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be sortedsorter- that sorts the iterable. Can be null.- Gibt zurück:
- a sorted iterable.
-
peek
A Helper function that allows to preview the result of a Iterable.- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be peeked ataction- callback that receives the value before the iterable returns it- Gibt zurück:
- a peeked iterable
-
peek
A Helper function that allows to preview the result of a Iterable from a Java Iterable- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be peeked ataction- callback that receives the value before the iterable returns it- Gibt zurück:
- a peeked iterable
-
wrap
A Wrapper function that wraps a Java-Iterable into a Type Specific Iterable- Typparameter:
T- the keyType of elements maintained by this Collection- Parameter:
iterable- that should be wrapped- Gibt zurück:
- a type specific iterable
-