|
|||||||||||
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.HsqlLinkedList
Intended as an asynchronous alternative to HsqlArrayList. Use HsqlArrayList if the list won't be initialized sequentially and if frequent references to specific element positions will be made.
Field Summary | |
protected int |
elementCount
|
Constructor Summary | |
HsqlLinkedList()
Creates a new instance of HsqlLinkedList. |
Method Summary | |
void |
add(int index,
Object element)
Inserts element at index . |
boolean |
add(Object element)
Appends element to the end of this list. |
Object |
get(int index)
Gets the element at given position |
protected org.hsqldb.lib.HsqlLinkedList.Node |
getInternal(int index)
Helper method that returns the Node at index . |
boolean |
isEmpty()
|
Iterator |
iterator()
|
Object |
remove(int index)
Removes and returns the element at index . |
Object |
set(int index,
Object element)
Replaces the current element at index/code> with
|
int |
size()
Accessor for the size of this linked list. |
String |
toString()
Returns a string representation |
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 HsqlLinkedList()
Method Detail |
public void add(int index, Object element)
element
at index
.
add
in interface HsqlList
IndexOutOfBoundsException
- if index
< 0 or is >
size
.public boolean add(Object element)
element
to the end of this list.
add
in interface HsqlList
public Object get(int index)
get
in interface HsqlList
IndexOutOfBoundsException
- if index is not valid
index within the list (0 <= index
<
size
).public Object remove(int index)
index
.
remove
in interface HsqlList
IndexOutOfBoundsException
- if index is not valid
index within the list (0 <= index
<
size
).public Object set(int index, Object element)
index/code> with
element
.
- Specified by:
set
in interface HsqlList
- Returns:
- The current element at
index
.
public final int size()
size
in interface HsqlList
protected final org.hsqldb.lib.HsqlLinkedList.Node getInternal(int index)
index
.
index
- The index of the Node to return.
IndexOutOfBoundsException
- if index is not valid
index within the list (0 <= index
<
size
).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 |