public interface ObjectSpliterator<K>
extends java.util.Spliterator<K>
Spliterator; provides an additional methods to avoid (un)boxing, and
the possibility to skip elements.Spliterator| Modifier and Type | Method and Description |
|---|---|
default long |
skip(long n)
Skips the given number of elements.
|
ObjectSpliterator<K> |
trySplit() |
default long skip(long n)
The effect of this call is exactly the same as that of calling Spliterator.tryAdvance(java.util.function.Consumer<? super T>) for
n times (possibly stopping if Spliterator.tryAdvance(java.util.function.Consumer<? super T>) returns false).
The action called will do nothing; elements will be discarded.
n - the number of elements to skip.Spliterator.tryAdvance(java.util.function.Consumer<? super T>)ObjectSpliterator<K> trySplit()
trySplit in interface java.util.Spliterator<K>