|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.reporting.engine.classic.core.util.IntList
public class IntList
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.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 | |
---|---|
IntList(int capacity)
Creates a new IntList with the given initial capacity. |
Method Summary | |
---|---|
void |
add(int value)
Adds the given int value to the list. |
void |
clear()
Clears the list. |
int |
get(int index)
Returns the value at the given index. |
int |
size()
Returns the number of elements in this list. |
int[] |
toArray()
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 IntList(int capacity)
capacity
- the initial capacity.Method Detail |
---|
public void add(int value)
value
- the new value to be added.public int 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 int[] toArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |