Package com.google.common.collect
Class CollectSpliterators
java.lang.Object
com.google.common.collect.CollectSpliterators
Spliterator utilities for
common.collect internals.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classCollectSpliterators.FlatMapSpliterator<InElementT,OutElementT, OutSpliteratorT extends Spliterator<OutElementT>> Implements theoperation on spliterators.invalid reference
Stream#flatMap(package private) static final class(package private) static final class(package private) static final class(package private) static final classImplementation ofwith an object spliterator output type.invalid reference
Stream#flatMap(package private) static classCollectSpliterators.FlatMapSpliteratorOfPrimitive<InElementT,OutElementT, OutConsumerT, OutSpliteratorT extends Spliterator.OfPrimitive<OutElementT, OutConsumerT, OutSpliteratorT>> Implementation ofwith a primitive spliterator output type.invalid reference
Stream#flatMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T> Spliterator<T> filter(Spliterator<T> fromSpliterator, Predicate<? super T> predicate) Returns aSpliteratorfiltered by the specified predicate.(package private) static <InElementT,OutElementT>
Spliterator<OutElementT> flatMap(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator<OutElementT>> function, int topCharacteristics, long topSize) Returns aSpliteratorthat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator.(package private) static <InElementT>
Spliterator.OfDoubleflatMapToDouble(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfDouble> function, int topCharacteristics, long topSize) Returns aSpliterator.OfDoublethat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator.(package private) static <InElementT>
Spliterator.OfIntflatMapToInt(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfInt> function, int topCharacteristics, long topSize) Returns aSpliterator.OfIntthat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator.(package private) static <InElementT>
Spliterator.OfLongflatMapToLong(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfLong> function, int topCharacteristics, long topSize) Returns aSpliterator.OfLongthat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator.(package private) static <T> Spliterator<T> indexed(int size, int extraCharacteristics, IntFunction<T> function) (package private) static <T> Spliterator<T> indexed(int size, int extraCharacteristics, IntFunction<T> function, Comparator<? super T> comparator) (package private) static <InElementT,OutElementT>
Spliterator<OutElementT> map(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, ? extends OutElementT> function) Returns aSpliteratorover the elements offromSpliteratormapped byfunction.
-
Constructor Details
-
CollectSpliterators
private CollectSpliterators()
-
-
Method Details
-
indexed
-
indexed
static <T> Spliterator<T> indexed(int size, int extraCharacteristics, IntFunction<T> function, @CheckForNull Comparator<? super T> comparator) -
map
static <InElementT,OutElementT> Spliterator<OutElementT> map(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, ? extends OutElementT> function) Returns aSpliteratorover the elements offromSpliteratormapped byfunction. -
filter
Returns aSpliteratorfiltered by the specified predicate. -
flatMap
static <InElementT,OutElementT> Spliterator<OutElementT> flatMap(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator<OutElementT>> function, int topCharacteristics, long topSize) Returns aSpliteratorthat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator. -
flatMapToInt
static <InElementT> Spliterator.OfInt flatMapToInt(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfInt> function, int topCharacteristics, long topSize) Returns aSpliterator.OfIntthat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator. (Iffunctionreturnsnullfor an input, it is replaced with an empty stream.) -
flatMapToLong
static <InElementT> Spliterator.OfLong flatMapToLong(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfLong> function, int topCharacteristics, long topSize) Returns aSpliterator.OfLongthat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator. (Iffunctionreturnsnullfor an input, it is replaced with an empty stream.) -
flatMapToDouble
static <InElementT> Spliterator.OfDouble flatMapToDouble(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfDouble> function, int topCharacteristics, long topSize) Returns aSpliterator.OfDoublethat iterates over the elements of the spliterators generated by applyingfunctionto the elements offromSpliterator. (Iffunctionreturnsnullfor an input, it is replaced with an empty stream.)
-