public interface PrimitiveByteIterable
extends java.lang.Iterable<java.lang.Byte>
for creating one on the fly
Modifier and Type | Field and Description |
---|---|
static PrimitiveByteIterable |
EMPTY
Empty iterable of primitive byte values.
|
static PrimitiveByteIterator |
EMPTY_BYTE_ITERATOR
Empty iterator of primitive byte values.
|
Modifier and Type | Method and Description |
---|---|
default PrimitiveIntIterable |
asIntIterable()
View this byte iterable as an int iterable.
|
default PrimitiveLongIterable |
asLongIterable()
View this byte iterable as a long iterable.
|
default PrimitiveShortIterable |
asShortIterable()
View this byte iterable as a short iterable.
|
default PrimitiveIntIterable |
asUnsignedIntIterable()
View this byte iterable as an int iterable which uses the unsigned byte values
of this iterable.
|
default PrimitiveLongIterable |
asUnsignedLongIterable()
View this byte iterable as a long iterable which uses the unsigned byte values
of this iterable.
|
PrimitiveByteIterator |
byteIterator()
Get a primitive byte iterator.
|
default boolean |
containsByte(byte value)
Does this byte iterable contain the given value?
|
default void |
forEachByte(ByteConsumer action)
Invoke the given action with each byte value in this iterable.
|
default <E extends java.lang.Exception> |
forEachByteFragile(FragileByteConsumer<E> action)
Invoke the given fragile action with each value in this iterable.
|
default java.util.Iterator<java.lang.Byte> |
iterator() |
static final PrimitiveByteIterator EMPTY_BYTE_ITERATOR
PrimitiveByteIterator.EMPTY
static final PrimitiveByteIterable EMPTY
@NotNull PrimitiveByteIterator byteIterator()
@NotNull default java.util.Iterator<java.lang.Byte> iterator()
iterator
in interface java.lang.Iterable<java.lang.Byte>
default void forEachByte(@NotNull ByteConsumer action)
action
- action to be call for each byte value in sequemce.default <E extends java.lang.Exception> void forEachByteFragile(@NotNull FragileByteConsumer<E> action) throws E extends java.lang.Exception
E
- checked exception thrown by actionaction
- action to be called for each value in sequenceE
- if action
throws itE extends java.lang.Exception
default boolean containsByte(byte value)
value
- value to check fortrue
if the value is contained in this iterable, false
if not@NotNull default PrimitiveShortIterable asShortIterable()
@NotNull default PrimitiveIntIterable asIntIterable()
@NotNull default PrimitiveIntIterable asUnsignedIntIterable()
@NotNull default PrimitiveLongIterable asLongIterable()
@NotNull default PrimitiveLongIterable asUnsignedLongIterable()