Package com.google.common.collect
Class CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,OutSpliteratorT extends Spliterator<OutElementT>>
java.lang.Object
com.google.common.collect.CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,OutSpliteratorT>
- Type Parameters:
InElementT
- the element type of the input spliteratorOutElementT
- the element type of the output spliteratorsOutSpliteratorT
- the type of the output spliterators
- All Implemented Interfaces:
Spliterator<OutElementT>
- Direct Known Subclasses:
CollectSpliterators.FlatMapSpliteratorOfObject
,CollectSpliterators.FlatMapSpliteratorOfPrimitive
- Enclosing class:
CollectSpliterators
abstract static class CollectSpliterators.FlatMapSpliterator<InElementT,OutElementT,OutSpliteratorT extends Spliterator<OutElementT>>
extends Object
implements Spliterator<OutElementT>
Implements the
operation on spliterators.
invalid reference
Stream#flatMap
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface
Factory for constructingCollectSpliterators.FlatMapSpliterator
instances.Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,
T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
(package private) long
(package private) final CollectSpliterators.FlatMapSpliterator.Factory
<InElementT, OutSpliteratorT> (package private) final Spliterator
<InElementT> (package private) final Function
<? super InElementT, OutSpliteratorT> (package private) OutSpliteratorT
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorsConstructorDescriptionFlatMapSpliterator
(OutSpliteratorT prefix, Spliterator<InElementT> from, Function<? super InElementT, OutSpliteratorT> function, CollectSpliterators.FlatMapSpliterator.Factory<InElementT, OutSpliteratorT> factory, int characteristics, long estimatedSize) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
final long
void
forEachRemaining
(Consumer<? super OutElementT> action) boolean
tryAdvance
(Consumer<? super OutElementT> action) final OutSpliteratorT
trySplit()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
prefix
-
from
-
function
-
factory
final CollectSpliterators.FlatMapSpliterator.Factory<InElementT,OutSpliteratorT extends Spliterator<OutElementT>> factory -
characteristics
int characteristics -
estimatedSize
long estimatedSize
-
-
Constructor Details
-
FlatMapSpliterator
FlatMapSpliterator(@CheckForNull OutSpliteratorT prefix, Spliterator<InElementT> from, Function<? super InElementT, OutSpliteratorT> function, CollectSpliterators.FlatMapSpliterator.Factory<InElementT, OutSpliteratorT> factory, int characteristics, long estimatedSize)
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvance
in interfaceSpliterator<InElementT>
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceSpliterator<InElementT>
-
trySplit
- Specified by:
trySplit
in interfaceSpliterator<InElementT>
-
estimateSize
public final long estimateSize()- Specified by:
estimateSize
in interfaceSpliterator<InElementT>
-
characteristics
public final int characteristics()- Specified by:
characteristics
in interfaceSpliterator<InElementT>
-