org.jfree.layouting.util
public class LongList extends Object implements Serializable, Cloneable
Using this list for storing ints is much faster than creating java.lang.Integer objects and storing them in an ArrayList.
This list is not synchronized and does not implement the full List interface. In fact, this list can only be used to add new values or to clear the complete list.
Constructor Summary | |
---|---|
LongList(int capacity)
Creates a new IntList with the given initial capacity.
|
Method Summary | |
---|---|
void | add(long value)
Adds the given int value to the list.
|
void | clear()
Clears the list. |
Object | clone() |
long | get(int index)
Returns the value at the given index.
|
void | set(int index, long value)
Adds the given int value to the list.
|
int | size()
Returns the number of elements in this list.
|
long[] | toArray()
Copys the list contents into a new array.
|
Parameters: capacity the initial capacity.
Parameters: value the new value to be added.
Parameters: index the index
Returns: the value at the given index
Throws: IndexOutOfBoundsException if the index is greater or equal to the list size or if the index is negative.
Parameters: value the new value to be added.
Returns: the number of elements in the list
Returns: the list contents as array.