Package it.unimi.dsi.fastutil.bytes
Interface ByteSpliterator
- All Superinterfaces:
java.util.Spliterator<java.lang.Byte>,java.util.Spliterator.OfPrimitive<java.lang.Byte,it.unimi.dsi.fastutil.bytes.ByteConsumer,ByteSpliterator>
public interface ByteSpliterator extends java.util.Spliterator.OfPrimitive<java.lang.Byte,it.unimi.dsi.fastutil.bytes.ByteConsumer,ByteSpliterator>
A type-specific
Spliterator; provides an additional methods to avoid (un)boxing, and
the possibility to skip elements.- Since:
- 8.5.0
- Author:
- C. Sean Young <[email protected]>
- 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>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Method Summary
Modifier and Type Method Description default voidforEachRemaining(java.util.function.Consumer<? super java.lang.Byte> action)Deprecated.Please use the corresponding type-specific method instead.default it.unimi.dsi.fastutil.bytes.ByteComparatorgetComparator()default longskip(long n)Skips the given number of elements.default booleantryAdvance(java.util.function.Consumer<? super java.lang.Byte> action)Deprecated.Please use the corresponding type-specific method instead.ByteSpliteratortrySplit()Methods inherited from interface java.util.Spliterator
characteristics, estimateSize, getExactSizeIfKnown, hasCharacteristicsMethods inherited from interface java.util.Spliterator.OfPrimitive
forEachRemaining, tryAdvance
-
Method Details
-
tryAdvance
@Deprecated default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Byte> action)Deprecated.Please use the corresponding type-specific method instead.- Specified by:
tryAdvancein interfacejava.util.Spliterator<java.lang.Byte>
-
forEachRemaining
@Deprecated default void forEachRemaining(java.util.function.Consumer<? super java.lang.Byte> action)Deprecated.Please use the corresponding type-specific method instead.- Specified by:
forEachRemainingin interfacejava.util.Spliterator<java.lang.Byte>
-
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.Byte>)forntimes (possibly stopping iftryAdvance(java.util.function.Consumer<? super java.lang.Byte>)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
ByteSpliterator trySplit()- Specified by:
trySplitin interfacejava.util.Spliterator<java.lang.Byte>- Specified by:
trySplitin interfacejava.util.Spliterator.OfPrimitive<java.lang.Byte,it.unimi.dsi.fastutil.bytes.ByteConsumer,ByteSpliterator>- API Notes:
- Note that this specification strengthens the one given in
Spliterator.trySplit().
-
getComparator
default it.unimi.dsi.fastutil.bytes.ByteComparator getComparator()- Specified by:
getComparatorin interfacejava.util.Spliterator<java.lang.Byte>- API Notes:
- Note that this specification strengthens the one given in
Spliterator.getComparator().
-