java.lang.Object
speiger.src.collections.bytes.utils.ByteIterables
A Helper class for Iterables
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <E> ObjectIterable<E>arrayFlatMap(Iterable<? extends Byte> iterable, ByteFunction<E[]> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.static <E> ObjectIterable<E>arrayFlatMap(ByteIterable iterable, ByteFunction<E[]> mapper) A Helper function that flatMaps a Iterable into a new Type.static ByteIterableA Helper function that filters out all duplicated elements from a Java Iterable.static ByteIterabledistinct(ByteIterable iterable) A Helper function that filters out all duplicated elements.static ByteIterablefilter(Iterable<? extends Byte> iterable, BytePredicate filter) A Helper function that filters out all desired elements from a Java-Iterablestatic ByteIterablefilter(ByteIterable iterable, BytePredicate filter) A Helper function that filters out all desired elementsstatic <E,V extends Iterable<E>>
ObjectIterable<E>flatMap(Iterable<? extends Byte> iterable, ByteFunction<V> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.static <E,V extends Iterable<E>>
ObjectIterable<E>flatMap(ByteIterable iterable, ByteFunction<V> mapper) A Helper function that flatMaps a Iterable into a new Type.static ByteIterableA Helper function that hard limits the Iterable to a specific size from a Java Iterablestatic ByteIterablelimit(ByteIterable iterable, long limit) A Helper function that hard limits the Iterable to a specific sizestatic <E> ObjectIterable<E>map(Iterable<? extends Byte> iterable, ByteFunction<E> mapper) A Helper function that maps a Java-Iterable into a new Type.static <E> ObjectIterable<E>map(ByteIterable iterable, ByteFunction<E> mapper) A Helper function that maps a Iterable into a new Type.static ByteIterablepeek(Iterable<? extends Byte> iterable, ByteConsumer action) A Helper function that allows to preview the result of a Iterable from a Java Iterablestatic ByteIterablepeek(ByteIterable iterable, ByteConsumer action) A Helper function that allows to preview the result of a Iterable.static ByteIterableA Helper function that repeats the Iterable a specific amount of times from a Java Iterablestatic ByteIterablerepeat(ByteIterable iterable, int repeats) A Helper function that repeats the Iterable a specific amount of timesstatic ByteIterablesorted(Iterable<? extends Byte> iterable, ByteComparator 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 ByteIterablesorted(ByteIterable iterable, ByteComparator sorter) A Helper function that sorts the Iterable.static ByteIterableA Wrapper function that wraps a Java-Iterable into a Type Specific Iterable
-
Konstruktordetails
-
ByteIterables
public ByteIterables()
-
-
Methodendetails
-
map
A Helper function that maps a Java-Iterable into a new Type.- Typparameter:
E- 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:
E- 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
-
flatMap
public static <E,V extends Iterable<E>> ObjectIterable<E> flatMap(Iterable<? extends Byte> iterable, ByteFunction<V> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.- Typparameter:
E- 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 <E,V extends Iterable<E>> ObjectIterable<E> flatMap(ByteIterable iterable, ByteFunction<V> mapper) A Helper function that flatMaps a Iterable into a new Type.- Typparameter:
E- 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 <E> ObjectIterable<E> arrayFlatMap(Iterable<? extends Byte> iterable, ByteFunction<E[]> mapper) A Helper function that flatMaps a Java-Iterable into a new Type.- Typparameter:
E- 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
A Helper function that flatMaps a Iterable into a new Type.- Typparameter:
E- 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- 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- 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.- 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.- 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- 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- 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- 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- 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.- 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.- 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.- 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- 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- Parameter:
iterable- that should be wrapped- Gibt zurück:
- a type specific iterable
-