Constructs an empty list with the specified initial capacity
Parameters:
initialCapacity - initialCapacity the initial capacity of the list
public int size()
Returns the number of values in this list.
Returns:
the number of values in the list
public void ensureCapacity(int capacity)
Increases the capacity of this list instance, if necessary, to ensure that it can hold at least the number of elements specified by the capacity argument.
Parameters:
capacity - capacity the desired capacity
public void add(int value)
Adds a value to the end of this list.
Parameters:
value - value the value to add
public void addAll(int[] values)
Adds all values in an array to the end of this list.
Parameters:
values - values an array of values
public int[] toArray()
Returns a int array containing a copy of the values in this list.