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 class
CollectSpliterators.FlatMapSpliterator<InElementT,
OutElementT, OutSpliteratorT extends Spliterator<OutElementT>> Implements theinvalid reference
Stream#flatMap
(package private) static final class
(package private) static final class
(package private) static final class
(package private) static final class
Implementation ofinvalid reference
Stream#flatMap
(package private) static class
CollectSpliterators.FlatMapSpliteratorOfPrimitive<InElementT,
OutElementT, OutConsumerT, OutSpliteratorT extends Spliterator.OfPrimitive<OutElementT, OutConsumerT, OutSpliteratorT>> Implementation ofinvalid 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 aSpliterator
filtered 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 aSpliterator
that iterates over the elements of the spliterators generated by applyingfunction
to the elements offromSpliterator
.(package private) static <InElementT>
Spliterator.OfDoubleflatMapToDouble
(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfDouble> function, int topCharacteristics, long topSize) Returns aSpliterator.OfDouble
that iterates over the elements of the spliterators generated by applyingfunction
to the elements offromSpliterator
.(package private) static <InElementT>
Spliterator.OfIntflatMapToInt
(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfInt> function, int topCharacteristics, long topSize) Returns aSpliterator.OfInt
that iterates over the elements of the spliterators generated by applyingfunction
to the elements offromSpliterator
.(package private) static <InElementT>
Spliterator.OfLongflatMapToLong
(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfLong> function, int topCharacteristics, long topSize) Returns aSpliterator.OfLong
that iterates over the elements of the spliterators generated by applyingfunction
to 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 aSpliterator
over the elements offromSpliterator
mapped 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 aSpliterator
over the elements offromSpliterator
mapped byfunction
. -
filter
Returns aSpliterator
filtered 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 aSpliterator
that iterates over the elements of the spliterators generated by applyingfunction
to the elements offromSpliterator
. -
flatMapToInt
static <InElementT> Spliterator.OfInt flatMapToInt(Spliterator<InElementT> fromSpliterator, Function<? super InElementT, Spliterator.OfInt> function, int topCharacteristics, long topSize) Returns aSpliterator.OfInt
that iterates over the elements of the spliterators generated by applyingfunction
to the elements offromSpliterator
. (Iffunction
returnsnull
for 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.OfLong
that iterates over the elements of the spliterators generated by applyingfunction
to the elements offromSpliterator
. (Iffunction
returnsnull
for 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.OfDouble
that iterates over the elements of the spliterators generated by applyingfunction
to the elements offromSpliterator
. (Iffunction
returnsnull
for an input, it is replaced with an empty stream.)
-