|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.util.LongList
public class LongList
A Array-List for integer objects. Ints can be added to the list and will be stored in an int-array.
Using this list for storing ints is much faster than creating java.lang.Long 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. |
|
LongList(long[] data,
int increment)
|
Method Summary | |
---|---|
void |
add(long value)
Adds the given int value to the list. |
void |
clear()
Clears the list. |
Object |
clone()
Creates a copy of this list. |
long |
get(int index)
Returns the value at the given index. |
void |
remove(int 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. |
long[] |
toArray(long[] retval)
Copys the list contents into a new array. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongList(int capacity)
capacity
- the initial capacity.public LongList(long[] data, int increment)
Method Detail |
---|
public void add(long value)
value
- the new value to be added.public void remove(int index)
public void set(int index, long value)
value
- the new value to be defined.index
- the position of the valur that should be redefined.public long get(int index)
index
- the index
IndexOutOfBoundsException
- if the index is greater or equal to the list size or if the index is negative.public void clear()
public int size()
public long[] toArray()
public long[] toArray(long[] retval)
retval
- the array that should receive the contents.
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- if something went wrong during the cloning.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |