|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiewald_CV_kit.utility.DoubleLinkedList<E>
public final class DoubleLinkedList<E>
just a common double linked list.
Nested Class Summary | |
---|---|
class |
DoubleLinkedList.Node<T>
each node has a link to a next node, and a link to a previous node, which actually defines a double-linked-list. |
Constructor Summary | |
---|---|
DoubleLinkedList()
|
Method Summary | |
---|---|
void |
add(E node_value)
add a new node-value to the list, AFTER the current position. |
void |
clear()
clear the list. |
DoubleLinkedList.Node<E> |
getCurrentNode()
returns the current node. |
int |
getPos()
returns the current position as an integer. |
DoubleLinkedList<E> |
gotoFirst()
move to the first node in the list. |
DoubleLinkedList<E> |
gotoMark()
move to previously set mark. |
DoubleLinkedList<E> |
gotoNext()
move to the next node in the list. |
DoubleLinkedList<E> |
gotoPrev()
move to the previous node in the list. |
DoubleLinkedList.Node<E> |
removeCurrentNode()
removes the current node from the list. |
DoubleLinkedList<E> |
setMark()
set a mark at the current node. |
int |
size()
returns the size of the list (number of nodes). |
E[] |
toArray(E[] array)
convert this list to a new array. |
List<E> |
toList()
convert this list to a new list. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleLinkedList()
Method Detail |
---|
public final void add(E node_value)
node_value
- the new node value.public final DoubleLinkedList.Node<E> removeCurrentNode()
public final void clear()
public final DoubleLinkedList<E> setMark()
public final DoubleLinkedList<E> gotoMark()
public final DoubleLinkedList.Node<E> getCurrentNode()
public final int getPos()
public final int size()
public final DoubleLinkedList<E> gotoFirst()
public final DoubleLinkedList<E> gotoNext()
public final DoubleLinkedList<E> gotoPrev()
public final E[] toArray(E[] array)
array
- null, or ideally an array with the size of the list (to save calculation time).
public final List<E> toList()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |