Package it.unimi.dsi.fastutil.shorts
Interface ShortSpliterator
- All Superinterfaces:
Spliterator<Short>,Spliterator.OfPrimitive<Short,ShortConsumer, ShortSpliterator>
public interface ShortSpliterator
extends Spliterator.OfPrimitive<Short,ShortConsumer,ShortSpliterator>
A type-specific
Spliterator; provides an additional methods to avoid (un)boxing, and
the possibility to skip elements.- Since:
- 8.5.0
- See Also:
-
Nested Class Summary
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
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Method Summary
Modifier and TypeMethodDescriptiondefault voidforEachRemaining(Consumer<? super Short> action) Deprecated.Please use the corresponding type-specific method instead.default ShortComparatordefault longskip(long n) Skips the given number of elements.default booleantryAdvance(Consumer<? super Short> action) Deprecated.Please use the corresponding type-specific method instead.trySplit()Methods inherited from interface java.util.Spliterator
characteristics, estimateSize, getExactSizeIfKnown, hasCharacteristicsMethods inherited from interface java.util.Spliterator.OfPrimitive
forEachRemaining, tryAdvance
-
Method Details
-
tryAdvance
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tryAdvancein interfaceSpliterator<Short>
-
forEachRemaining
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
forEachRemainingin interfaceSpliterator<Short>
-
skip
default long skip(long n) Skips the given number of elements.The effect of this call is exactly the same as that of calling
tryAdvance(java.util.function.Consumer<? super java.lang.Short>)forntimes (possibly stopping iftryAdvance(java.util.function.Consumer<? super java.lang.Short>)returns false). The action called will do nothing; elements will be discarded.- Parameters:
n- the number of elements to skip.- Returns:
- the number of elements actually skipped.
- See Also:
-
trySplit
ShortSpliterator trySplit()- Specified by:
trySplitin interfaceSpliterator<Short>- Specified by:
trySplitin interfaceSpliterator.OfPrimitive<Short,ShortConsumer, ShortSpliterator>
-
getComparator
- Specified by:
getComparatorin interfaceSpliterator<Short>
-