|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zig_project.gpl.common.arrays.IntList
An int list provides a list of int types, maintained in an array. The array is ordered based on the order in which ints were added, and is potentially more efficient than Collection based classes, as ints are stored directly as a primitive type, and are not required to be encapsulated by a wrapper class.
Field Summary | |
protected int[] |
intset
|
protected ArraySizeSelector |
selector
|
protected int |
size
|
Constructor Summary | |
IntList(int init_size)
Construct an IntList with the specified initial size. |
|
IntList(int init_size,
ArraySizeSelector sel)
Construct an IntList with the specified initial size and Array Size Selector. |
Method Summary | |
void |
add(int i)
Adds an int to the end of the list |
int |
getIndex(int idx)
Returns the value of the int located at the specified index. |
int |
removeIndex(int idx)
Removes the value at the specified index. |
int |
size()
Returns the current number of ints defined within this list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final ArraySizeSelector selector
protected int[] intset
protected int size
Constructor Detail |
public IntList(int init_size)
public IntList(int init_size, ArraySizeSelector sel)
init_size
- the initial size for the int list.sel
- the ArraySizeSelector to use for resizing.Method Detail |
public void add(int i)
public int getIndex(int idx)
idx
- the index of the value in the array to look up
IndexOutOfBoundsException
- if
!(0 <= idx < size())
public int size()
public int removeIndex(int idx)
idx
- the index of the value to remove
IndexOutOfBoundsException
- if
!(0 <= idx < size())
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |