org.globus.wsrf.utils.cache
Class LinkedNodeList

java.lang.Object
  extended by org.globus.wsrf.utils.cache.LinkedNodeList

public class LinkedNodeList
extends java.lang.Object

Special purpose double linked list implementation. Not for general use


Nested Class Summary
static class LinkedNodeList.Node
           
private static class LinkedNodeList.NodeIterator
           
 
Field Summary
private  LinkedNodeList.Node head
           
private  int size
           
private  LinkedNodeList.Node tail
           
 
Constructor Summary
LinkedNodeList()
           
 
Method Summary
 void add(LinkedNodeList.Node node)
          Adds a node to the end of the list.
 void clear()
           
 int computeSize()
           
 LinkedNodeList.Node createNode()
           
 LinkedNodeList.Node createNode(java.lang.Object value)
           
 LinkedNodeList.Node getFirst()
          Returns the first node in the list.
 LinkedNodeList.Node getLast()
          Returns the last node in the list.
 boolean isEmpty()
           
 java.util.Iterator iterator()
          When iterating must synchronize on the LinkedNodeList instance.
 void moveToEnd(LinkedNodeList.Node node)
          Removes node from the list and adds it to the end of the list.
 void remove(LinkedNodeList.Node node)
          Removes the node from the list.
 LinkedNodeList.Node removeFirst()
          Removes and returns the first node in the list.
 LinkedNodeList.Node removeLast()
          Removes and returns the last node in the list.
 java.util.Iterator reverseIterator()
          When iterating must synchronize on the LinkedNodeList instance.
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

head

private LinkedNodeList.Node head

tail

private LinkedNodeList.Node tail

size

private int size
Constructor Detail

LinkedNodeList

public LinkedNodeList()
Method Detail

createNode

public LinkedNodeList.Node createNode()

createNode

public LinkedNodeList.Node createNode(java.lang.Object value)

moveToEnd

public void moveToEnd(LinkedNodeList.Node node)
Removes node from the list and adds it to the end of the list.


computeSize

public int computeSize()

reverseIterator

public java.util.Iterator reverseIterator()
When iterating must synchronize on the LinkedNodeList instance.


iterator

public java.util.Iterator iterator()
When iterating must synchronize on the LinkedNodeList instance.


clear

public void clear()

isEmpty

public boolean isEmpty()

size

public int size()

add

public void add(LinkedNodeList.Node node)
Adds a node to the end of the list.


getFirst

public LinkedNodeList.Node getFirst()
Returns the first node in the list.


getLast

public LinkedNodeList.Node getLast()
Returns the last node in the list.


removeFirst

public LinkedNodeList.Node removeFirst()
Removes and returns the first node in the list.


removeLast

public LinkedNodeList.Node removeLast()
Removes and returns the last node in the list.


remove

public void remove(LinkedNodeList.Node node)
Removes the node from the list.


toString

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