public class FloatList extends Object
Constructor and Description |
---|
FloatList(int capacity)
Creates a new IntList with the given initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
add(float value)
Adds the given int value to the list.
|
void |
clear()
Clears the list.
|
float |
get(int index)
Returns the value at the given index.
|
int |
size()
Returns the number of elements in this list.
|
float[] |
toArray()
Copys the list contents into a new array.
|
public FloatList(int capacity)
capacity
- the initial capacity.public void add(float value)
value
- the new value to be added.public float get(int index)
index
- the indexIndexOutOfBoundsException
- if the index is greater or equal to the list size or if the index is negative.public void clear()
public int size()
public float[] toArray()