|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hsqldb.lib.BaseList org.hsqldb.lib.HsqlArrayList
Intended as an asynchronous alternative to Vector. Use HsqlLinkedList instead if its better suited.
Field Summary | |
protected int |
elementCount
|
Constructor Summary | |
HsqlArrayList()
Creates a new instance of HsqlArrayList |
|
HsqlArrayList(int initialCapacity)
Creates a new instance with the given initial capacity |
Method Summary | |
void |
add(int index,
Object element)
Inserts an element at the given index |
boolean |
add(Object element)
Appends an element to the end of the list |
void |
clear()
|
Object |
get(int index)
Gets the element at given position |
boolean |
isEmpty()
|
Iterator |
iterator()
|
Object |
remove(int index)
Removes and returns the element at given position |
void |
remove(Object obj)
|
Object |
set(int index,
Object element)
Replaces the element at given position |
void |
setSize(int newSize)
|
int |
size()
Returns the number of elements in the array list |
void |
sort(ObjectComparator c)
|
Object[] |
toArray()
|
Object |
toArray(Object a)
Copies all elements of the list to a[]. |
String |
toString()
Returns a string representation |
void |
trim()
Trims the array to be the same size as the number of elements. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.hsqldb.lib.HsqlList |
isEmpty, iterator |
Field Detail |
protected int elementCount
Constructor Detail |
public HsqlArrayList()
public HsqlArrayList(int initialCapacity)
Method Detail |
public void add(int index, Object element)
add
in interface HsqlList
public boolean add(Object element)
add
in interface HsqlList
public Object get(int index)
get
in interface HsqlList
public Object remove(int index)
remove
in interface HsqlList
public Object set(int index, Object element)
set
in interface HsqlList
public final int size()
size
in interface HsqlList
public void trim()
public void clear()
public void setSize(int newSize)
public Object[] toArray()
public Object toArray(Object a)
public void sort(ObjectComparator c)
public void remove(Object obj)
public boolean isEmpty()
public String toString()
public Iterator iterator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |