public final class IntArray
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
void |
add(int i) |
Append an integer to the end of the array.
|
int |
get(int index) |
Read value from the array.
|
int |
getSize() |
Returns the number of elements added to the array.
|
void |
set(int index,
int value) |
Write a value to the specified index.
|
int[] |
trim() |
Return a copy of the array, trimmed to fit the size of its contents
exactly.
|
public final void add(int i)
i
- public final void set(int index, int value)
index
- value
- public final int get(int index)
index
- index into the arraypublic final int getSize()
public final int[] trim()