org.apache.kahadb.util
Class LinkedNodeList<T extends LinkedNode<T>>

java.lang.Object
  extended by org.apache.kahadb.util.LinkedNodeList<T>
Direct Known Subclasses:
SequenceSet

public class LinkedNodeList<T extends LinkedNode<T>>
extends java.lang.Object

Provides a list of LinkedNode objects.

Author:
chirino

Constructor Summary
LinkedNodeList()
           
 
Method Summary
 void addFirst(LinkedNodeList<T> list)
           
 void addFirst(T node)
           
 void addLast(LinkedNodeList<T> list)
           
 void addLast(T node)
           
 void clear()
           
 T getHead()
           
 T getTail()
           
 boolean isEmpty()
           
 T reparent(LinkedNodeList<T> list)
           
 T rotate()
          Move the head to the tail and returns the new head node.
 void rotateTo(T head)
          Move the head to the tail and returns the new head node.
 int size()
           
 java.util.ArrayList<T> toArrayList()
          Copies the nodes of the LinkedNodeList to an ArrayList.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkedNodeList

public LinkedNodeList()
Method Detail

isEmpty

public boolean isEmpty()

addLast

public void addLast(T node)

addFirst

public void addFirst(T node)

getHead

public T getHead()

getTail

public T getTail()

clear

public void clear()

addLast

public void addLast(LinkedNodeList<T> list)

addFirst

public void addFirst(LinkedNodeList<T> list)

reparent

public T reparent(LinkedNodeList<T> list)

rotate

public T rotate()
Move the head to the tail and returns the new head node.

Returns:

rotateTo

public void rotateTo(T head)
Move the head to the tail and returns the new head node.


size

public int size()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toArrayList

public java.util.ArrayList<T> toArrayList()
Copies the nodes of the LinkedNodeList to an ArrayList.

Returns:


Copyright © 2005-2015. All Rights Reserved.