Package com.google.common.collect
Class CollectSpliterators
- java.lang.Object
-
- com.google.common.collect.CollectSpliterators
-
@GwtCompatible final class CollectSpliterators extends java.lang.Object
Spliterator utilities forcommon.collectinternals.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classCollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,OutSpliteratorT extends java.util.Spliterator<OutElementT>>Implements theStream#flatMapoperation on spliterators.(package private) static classCollectSpliterators.FlatMapSpliteratorOfDouble<InElementT>(package private) static classCollectSpliterators.FlatMapSpliteratorOfInt<InElementT>(package private) static classCollectSpliterators.FlatMapSpliteratorOfLong<InElementT>(package private) static classCollectSpliterators.FlatMapSpliteratorOfObject<InElementT,OutElementT>Implementation ofStream#flatMapwith an object spliterator output type.(package private) static classCollectSpliterators.FlatMapSpliteratorOfPrimitive<InElementT,OutElementT,OutConsumerT,OutSpliteratorT extends java.util.Spliterator.OfPrimitive<OutElementT,OutConsumerT,OutSpliteratorT>>Implementation ofStream#flatMapwith a primitive spliterator output type.
-
Constructor Summary
Constructors Modifier Constructor Description privateCollectSpliterators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static <T> java.util.Spliterator<T>filter(java.util.Spliterator<T> fromSpliterator, java.util.function.Predicate<? super T> predicate)Returns aSpliteratorfiltered by the specified predicate.(package private) static <InElementT,OutElementT>
java.util.Spliterator<OutElementT>flatMap(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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>
java.util.Spliterator.OfDoubleflatMapToDouble(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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>
java.util.Spliterator.OfIntflatMapToInt(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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>
java.util.Spliterator.OfLongflatMapToLong(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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> java.util.Spliterator<T>indexed(int size, int extraCharacteristics, java.util.function.IntFunction<T> function)(package private) static <T> java.util.Spliterator<T>indexed(int size, int extraCharacteristics, java.util.function.IntFunction<T> function, java.util.Comparator<? super T> comparator)(package private) static <InElementT,OutElementT>
java.util.Spliterator<OutElementT>map(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,? extends OutElementT> function)Returns aSpliteratorover the elements offromSpliteratormapped byfunction.
-
-
-
Method Detail
-
indexed
static <T> java.util.Spliterator<T> indexed(int size, int extraCharacteristics, java.util.function.IntFunction<T> function)
-
indexed
static <T> java.util.Spliterator<T> indexed(int size, int extraCharacteristics, java.util.function.IntFunction<T> function, java.util.Comparator<? super T> comparator)
-
map
static <InElementT,OutElementT> java.util.Spliterator<OutElementT> map(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,? extends OutElementT> function)Returns aSpliteratorover the elements offromSpliteratormapped byfunction.
-
filter
static <T> java.util.Spliterator<T> filter(java.util.Spliterator<T> fromSpliterator, java.util.function.Predicate<? super T> predicate)Returns aSpliteratorfiltered by the specified predicate.
-
flatMap
static <InElementT,OutElementT> java.util.Spliterator<OutElementT> flatMap(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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> java.util.Spliterator.OfInt flatMapToInt(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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> java.util.Spliterator.OfLong flatMapToLong(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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> java.util.Spliterator.OfDouble flatMapToDouble(java.util.Spliterator<InElementT> fromSpliterator, java.util.function.Function<? super InElementT,java.util.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.)
-
-