|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.inxar.syntacs.util.ArrayIntList
Concrete implementation of IntList
which uses an
array internally.
Constructor Summary | |
ArrayIntList()
Constructs a new ArrayIntList using a default
initial capacity. |
|
ArrayIntList(int capacity)
Constructs a new ArrayIntList with the given initial
capacity. |
Method Summary | |
int |
add(int value)
Adds the given value to the end of the list and returns the index number of the element that was written. |
int |
at(int index)
Returns the value at the given index. |
Object |
clone()
Clones the IntArray . |
boolean |
contains(int value)
Returns true if the given value is in
the list, false otherwise. |
IntIterator |
iterator()
Returns an iterator view over the list. |
int |
length()
Returns the length of the array. |
void |
set(int index,
int value)
|
int[] |
toArray()
Returns a new primitive-typed copy of the array. |
String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ArrayIntList(int capacity)
ArrayIntList
with the given initial
capacity.public ArrayIntList()
ArrayIntList
using a default
initial capacity.Method Detail |
public int add(int value)
IntList
add
in interface IntList
public void set(int index, int value)
public int at(int index)
IntArray
at
in interface IntArray
public int[] toArray()
IntArray
toArray
in interface IntArray
public IntIterator iterator()
IntList
iterator
in interface IntList
public boolean contains(int value)
IntList
true
if the given value
is in
the list, false
otherwise.contains
in interface IntList
public int length()
IntArray
length
in interface IntArray
public String toString()
toString
in class Object
public Object clone() throws CloneNotSupportedException
IntArray
IntArray
.clone
in interface IntArray
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |