public final class LongArray extends Object
long[].| Constructor | Description |
|---|---|
LongArray() |
|
LongArray(int initialCapacity) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(long value) |
Appends a value.
|
long |
get(int index) |
Returns the value at a specified index.
|
int |
size() |
Returns the current size of the array.
|
long[] |
toArray() |
Copies the current values into a newly allocated primitive array.
|
public LongArray()
public LongArray(int initialCapacity)
initialCapacity - The initial capacity of the array.public void add(long value)
value - The value to append.public long get(int index)
index - The index.IndexOutOfBoundsException - If the index is less than zero, or greater than or equal to
size().public int size()
public long[] toArray()