|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.util.IntArray
The IntArray is a variable array containing integers. The API follows the JDK 1.2 collection classes.
Constructor Summary | |
IntArray()
Create an empty int array. |
Method Summary | |
void |
add(int i)
Adds an integer to the array. |
void |
add(IntArray array)
Appends the integers in array to the end of this array. |
void |
add(int i,
int value)
Inserts an integer into the array. |
void |
clear()
clear the array, i.e. |
boolean |
contains(int test)
Returns true if the array contains and integer equal to test. |
int |
get(int i)
Gets the integer value at the given index. |
boolean |
isSubset(IntArray subset)
True if all the integers in subset are contained in the array. |
int |
last()
Returns the last integer in the array. |
int |
pop()
Pops the value off the end of the array. |
void |
set(int i,
int value)
Sets the value at the given index. |
void |
setLength(int size)
Sets the length of the array, filling with zero if necessary. |
int |
size()
Returns the current size of the array |
int[] |
toArray()
Return a new int array with the contents. |
void |
union(IntArray newArray)
Adds the members of newArray to the list if they are not already members of the array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IntArray()
Method Detail |
public void clear()
public int size()
public void add(int i)
public void add(IntArray array)
public void add(int i, int value)
public int pop()
public void setLength(int size)
public int get(int i)
i
- index into the array.public int last()
public void set(int i, int value)
public boolean contains(int test)
public boolean isSubset(IntArray subset)
public void union(IntArray newArray)
public int[] toArray()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |