Package it.unimi.dsi.fastutil.shorts
Interface ShortSpliterator
-
- All Superinterfaces:
java.util.Spliterator<java.lang.Short>
,java.util.Spliterator.OfPrimitive<java.lang.Short,ShortConsumer,ShortSpliterator>
- All Known Implementing Classes:
AbstractShortSpliterator
,ShortBigSpliterators.AbstractIndexBasedSpliterator
,ShortBigSpliterators.EarlyBindingSizeIndexBasedSpliterator
,ShortBigSpliterators.LateBindingSizeIndexBasedSpliterator
,ShortSpliterators.AbstractIndexBasedSpliterator
,ShortSpliterators.EarlyBindingSizeIndexBasedSpliterator
,ShortSpliterators.EmptySpliterator
,ShortSpliterators.LateBindingSizeIndexBasedSpliterator
public interface ShortSpliterator extends java.util.Spliterator.OfPrimitive<java.lang.Short,ShortConsumer,ShortSpliterator>
A type-specificSpliterator
; provides an additional methods to avoid (un)boxing, and the possibility to skip elements.- Since:
- 8.5.0
- Author:
- C. Sean Young <csyoung@google.com>
- See Also:
Spliterator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.Spliterator
java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,T_CONS extends java.lang.Object,T_SPLITR extends java.util.Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
forEachRemaining(java.util.function.Consumer<? super java.lang.Short> action)
Deprecated.Please use the corresponding type-specific method instead.default ShortComparator
getComparator()
default long
skip(long n)
Skips the given number of elements.default boolean
tryAdvance(java.util.function.Consumer<? super java.lang.Short> action)
Deprecated.Please use the corresponding type-specific method instead.ShortSpliterator
trySplit()
-
-
-
Method Detail
-
tryAdvance
@Deprecated default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Short> action)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tryAdvance
in interfacejava.util.Spliterator<java.lang.Short>
-
forEachRemaining
@Deprecated default void forEachRemaining(java.util.function.Consumer<? super java.lang.Short> action)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
forEachRemaining
in interfacejava.util.Spliterator<java.lang.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>)
forn
times (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:
Spliterator.tryAdvance(java.util.function.Consumer<? super T>)
- Implementation Specification:
- This default implementation is linear in n. It is expected concrete implementations that are capable of it will override it to run lower time, but be prepared for linear time.
-
trySplit
ShortSpliterator trySplit()
- Specified by:
trySplit
in interfacejava.util.Spliterator<java.lang.Short>
- Specified by:
trySplit
in interfacejava.util.Spliterator.OfPrimitive<java.lang.Short,ShortConsumer,ShortSpliterator>
- API Notes:
- Note that this specification strengthens the one given in
Spliterator.trySplit()
.
-
getComparator
default ShortComparator getComparator()
- Specified by:
getComparator
in interfacejava.util.Spliterator<java.lang.Short>
- API Notes:
- Note that this specification strengthens the one given in
Spliterator.getComparator()
.
-
-