Class IteratorAsSpliterator<T>
java.lang.Object
org.infinispan.stream.impl.spliterators.IteratorAsSpliterator<T>
- All Implemented Interfaces:
AutoCloseable,Spliterator<T>,org.infinispan.commons.util.CloseableSpliterator<T>
public class IteratorAsSpliterator<T>
extends Object
implements org.infinispan.commons.util.CloseableSpliterator<T>
A Spliterator using the provided iterator for supplying values.
Splits occur start at the batch size. Each split gets subsequently bigger by increasing by the original
split size. The batch size will never become higher than the configured max batch size
-
Nested Class Summary
Nested ClassesNested 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
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()longvoidforEachRemaining(Consumer<? super T> action) Comparator<? super T> booleantryAdvance(Consumer<? super T> action) trySplit()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Spliterator
getExactSizeIfKnown, hasCharacteristics
-
Method Details
-
trySplit
- Specified by:
trySplitin interfaceSpliterator<T>
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceSpliterator<T>
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<T>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<T>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<T>
-
getComparator
- Specified by:
getComparatorin interfaceSpliterator<T>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.infinispan.commons.util.CloseableSpliterator<T>
-