public interface ByteIterator extends Iterator<Byte>
Iterator; provides an additional method to avoid (un)boxing, and
the possibility to skip elements.Iterator| Modifier and Type | Method and Description |
|---|---|
default void |
forEachRemaining(ByteConsumer action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
default void |
forEachRemaining(Consumer<? super Byte> action)
Deprecated.
Please use the corresponding type-specific method instead.
|
default Byte |
next()
Deprecated.
Please use the corresponding type-specific method instead.
|
byte |
nextByte()
Returns the next element as a primitive type.
|
default int |
skip(int n)
Skips the given number of elements.
|
byte nextByte()
Iterator.next()@Deprecated default Byte next()
default void forEachRemaining(ByteConsumer action)
action - the action to be performed for each element.Iterator.forEachRemaining(java.util.function.Consumer)@Deprecated default void forEachRemaining(Consumer<? super Byte> action)
forEachRemaining in interface Iterator<Byte>default int skip(int n)
The effect of this call is exactly the same as that of calling next() for n times (possibly stopping if Iterator.hasNext() becomes false).
n - the number of elements to skip.Iterator.next()Copyright © 2020. All rights reserved.