public final class ArrayByte extends ListByte implements Serializable
byte[]
into a ListByte
.Constructor and Description |
---|
ArrayByte(byte... array)
A new read-only
ArrayByte that wraps around the given array. |
ArrayByte(byte[] array,
boolean readOnly)
A new
ArrayByte that wraps around the given array. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
byte |
getByte(int index)
Returns the element at the specified position in this list casted to a byte.
|
IteratorByte |
iterator()
Returns an iterator over the elements of the collection.
|
void |
setByte(int index,
byte value)
Changes the element at the specified position, casting to the internal
representation.
|
int |
size()
Returns the number of elements in the collection.
|
public ArrayByte(byte... array)
ArrayByte
that wraps around the given array.array
- an arraypublic ArrayByte(byte[] array, boolean readOnly)
ArrayByte
that wraps around the given array.array
- an arrayreadOnly
- if false the wrapper allows writes to the arraypublic final IteratorByte iterator()
CollectionNumber
iterator
in interface CollectionByte
iterator
in interface CollectionNumber
iterator
in class ListByte
public final int size()
CollectionNumber
size
in interface CollectionNumber
public final byte getByte(int index)
ListNumber
getByte
in interface ListNumber
index
- position of the element to returnpublic void setByte(int index, byte value)
ListNumber
setByte
in interface ListNumber
setByte
in class ListByte
index
- position of the element to changevalue
- the new valueCopyright © 2015. All rights reserved.