Package com.landawn.abacus.util
Class ByteIterator
java.lang.Object
com.landawn.abacus.util.ByteIterator
- Direct Known Subclasses:
ByteIteratorEx
- Since:
- 0.8
- Author:
- Haiyang Li
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteIterator
defer
(Supplier<? extends ByteIterator> iteratorSupplier) Lazy evaluation.static ByteIterator
empty()
<E extends Exception>
voidforeachIndexed
(Throwables.IndexedByteConsumer<E> action) <E extends Exception>
voidforeachRemaining
(Throwables.ByteConsumer<E> action) void
forEachRemaining
(Consumer<? super Byte> action) Deprecated.static ByteIterator
generate
(ByteSupplier supplier) Returns an infiniteByteIterator
.static ByteIterator
generate
(BooleanSupplier hasNext, ByteSupplier supplier) indexed()
indexed
(long startIndex) next()
Deprecated.abstract byte
nextByte()
static ByteIterator
of
(byte... a) static ByteIterator
of
(byte[] a, int fromIndex, int toIndex) void
remove()
Deprecated.- UnsupportedOperationExceptionstream()
byte[]
toArray()
<C extends Collection<T>>
CtoCollection
(Supplier<? extends C> supplier) toList()
toSet()
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ByteIterator
public ByteIterator()
-
-
Method Details
-
empty
-
of
- Parameters:
a
-- Returns:
-
of
- Parameters:
a
-fromIndex
-toIndex
-- Returns:
-
defer
Lazy evaluation.- Parameters:
iteratorSupplier
-- Returns:
-
generate
Returns an infiniteByteIterator
.- Parameters:
supplier
-- Returns:
-
generate
- Parameters:
hasNext
-supplier
-- Returns:
-
next
Deprecated.usenextByte()
instead.- Returns:
-
nextByte
public abstract byte nextByte() -
toArray
public byte[] toArray() -
toList
-
stream
-
indexed
-
indexed
-
forEachRemaining
Deprecated.For each remaining.- Parameters:
action
-
-
foreachRemaining
- Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
foreachIndexed
- Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
remove
Deprecated.- UnsupportedOperationException- Specified by:
remove
in interfaceIterator<T>
- Throws:
UnsupportedOperationException
-
toSet
-
toCollection
- Type Parameters:
C
-- Parameters:
supplier
-- Returns:
-
toImmutableList
-
toImmutableSet
-
nextByte()
instead.