DoubleLinkedList (Javadocs: diewald_CV_kit)

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## diewald_CV_kit.utility
Class DoubleLinkedList<E>

    java.lang.Object
      diewald_CV_kit.utility.DoubleLinkedList<E>

    public final class DoubleLinkedList<E>

extends Object

just a common double linked list.

Author:
  thomas diewald (c) 2011

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

### DoubleLinkedList

    public DoubleLinkedList()

Method Detail

### add

    public final void add(E node_value)

  add a new node-value to the list, AFTER the current position.

  Parameters:
    `node_value` - the new node value.

### removeCurrentNode

    public final DoubleLinkedList.Node<E> removeCurrentNode()

  removes the current node from the list.

  Returns:
    the removed node.

### clear

    public final void clear()

  clear the list.

### setMark

    public final DoubleLinkedList<E> setMark()

  set a mark at the current node.

  Returns:
    the list itself.

### gotoMark

    public final DoubleLinkedList<E> gotoMark()

  move to previously set mark.

  Returns:
    the list itself.

### getCurrentNode

    public final DoubleLinkedList.Node<E> getCurrentNode()

  returns the current node.

  Returns:
    the current node.

### getPos

    public final int getPos()

  returns the current position as an integer.

  Returns:
    the current position as an integer.

### size

    public final int size()

  returns the size of the list (number of nodes).

  Returns:
    the size of the list (number of nodes).

### gotoFirst

    public final DoubleLinkedList<E> gotoFirst()

  move to the first node in the list.

  Returns:
    the list itself.

### gotoNext

    public final DoubleLinkedList<E> gotoNext()

  move to the next node in the list.

  Returns:
    the list itself.

### gotoPrev

    public final DoubleLinkedList<E> gotoPrev()

  move to the previous node in the list.

  Returns:
    the list itself.

### toArray

    public final E[] toArray(E[] array)

  convert this list to a new array.

  Parameters:
    `array` - null, or ideally an array with the size of the list (to save calculation time).
  Returns:
    the new array.

### toList

    public final List<E> toList()

  convert this list to a new list.

  Returns:
    the new list.

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Processing library diewald_CV_kit by Thomas Diewald. (C) 2012