Package one.util.streamex
Class DistinctSpliterator<T>
java.lang.Object
one.util.streamex.Internals.Box<T>
one.util.streamex.DistinctSpliterator<T>
- All Implemented Interfaces:
Consumer<T>
,Spliterator<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T extends Object,
T_CONS extends Object, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
private AtomicLong
private final Spliterator<T>
Fields inherited from class one.util.streamex.Internals.Box
a
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorsConstructorDescriptionDistinctSpliterator
(Spliterator<T> source, long atLeast) DistinctSpliterator
(Spliterator<T> source, long atLeast, AtomicLong nullCounter, Map<T, Long> counts) -
Method Summary
Modifier and TypeMethodDescriptionint
long
void
forEachRemaining
(Consumer<? super T> action) Comparator<? super T>
boolean
tryAdvance
(Consumer<? super T> action) trySplit()
Methods inherited from class one.util.streamex.Internals.Box
accept, asOptional, partialCollector
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
getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
source
-
nullCounter
-
counts
-
atLeast
private final long atLeast
-
-
Constructor Details
-
DistinctSpliterator
DistinctSpliterator(Spliterator<T> source, long atLeast, AtomicLong nullCounter, Map<T, Long> counts) -
DistinctSpliterator
DistinctSpliterator(Spliterator<T> source, long atLeast)
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvance
in interfaceSpliterator<T>
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceSpliterator<T>
-
trySplit
- Specified by:
trySplit
in interfaceSpliterator<T>
-
estimateSize
public long estimateSize()- Specified by:
estimateSize
in interfaceSpliterator<T>
-
characteristics
public int characteristics()- Specified by:
characteristics
in interfaceSpliterator<T>
-
getComparator
- Specified by:
getComparator
in interfaceSpliterator<T>
-