public class IntList
extends java.lang.Object
Constructor and Description |
---|
IntList() |
Modifier and Type | Method and Description |
---|---|
void |
add(int i)
Adds an int to the list.
|
void |
clear()
Clears the list.
|
void |
compact()
Truncates unused parts from the internal storage list, so that the resulting list doesn't require more memory than
it has to.
|
int |
get(int pos)
Gets the list's value at a position.
|
int |
size()
Returns the size of the list.
|
public void add(int i)
i
- the intpublic void clear()
public int get(int pos)
pos
- the positionpublic int size()
public void compact()