public class ByteList extends PrimitiveList
| Constructor and Description |
|---|
ByteList()
Constructs a new list.
|
ByteList(byte[] array)
Constructs a new list initialised to the contents of a given array.
|
ByteList(int size)
Constructs a new list with a given initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte value)
Appends a value to the end of this list.
|
byte |
get(int i)
Returns the element at a given position.
|
void |
set(int i,
byte value)
Sets the element at a given position.
|
byte[] |
toByteArray()
Returns the contents of this list as an array.
|
nextCapacity, size, toArraypublic ByteList()
public ByteList(int size)
size - initial capacitypublic ByteList(byte[] array)
array - array whose contents form initial contents of listpublic byte get(int i)
i - indexipublic void set(int i,
byte value)
i - indexvalue - new value for element ipublic void add(byte value)
value - value to appendpublic byte[] toByteArray()
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.