org.apache.jcs.engine.memory.util
Class DoubleLinkedList

java.lang.Object
  extended byorg.apache.jcs.engine.memory.util.DoubleLinkedList

public class DoubleLinkedList
extends java.lang.Object

This is a generic thread safe double linked list.


Constructor Summary
DoubleLinkedList()
           
 
Method Summary
 void addFirst(DoubleLinkedListNode me)
          Adds a new node to the start of the link list.
 void addLast(DoubleLinkedListNode me)
          Adds a new node to the end of the link list.
 void debugDumpEntries()
          Dump the cache entries from first to list for debugging.
 DoubleLinkedListNode getFirst()
          Removes the specified node from the link list.
 DoubleLinkedListNode getLast()
          Removes the specified node from the link list.
 void makeFirst(DoubleLinkedListNode ln)
          Moves an existing node to the start of the link list.
 boolean remove(DoubleLinkedListNode me)
          Removes the specified node from the link list.
 void removeAll()
          Remove all of the elements from the linked list implementation.
 DoubleLinkedListNode removeLast()
          Removes the specified node from the link list.
 int size()
          Returns the size of the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleLinkedList

public DoubleLinkedList()
Method Detail

addLast

public void addLast(DoubleLinkedListNode me)
Adds a new node to the end of the link list.


addFirst

public void addFirst(DoubleLinkedListNode me)
Adds a new node to the start of the link list.


getLast

public DoubleLinkedListNode getLast()
Removes the specified node from the link list.


getFirst

public DoubleLinkedListNode getFirst()
Removes the specified node from the link list.


makeFirst

public void makeFirst(DoubleLinkedListNode ln)
Moves an existing node to the start of the link list.


removeAll

public void removeAll()
Remove all of the elements from the linked list implementation.


remove

public boolean remove(DoubleLinkedListNode me)
Removes the specified node from the link list.

Parameters:
me - Description of the Parameter

removeLast

public DoubleLinkedListNode removeLast()
Removes the specified node from the link list.


size

public int size()
Returns the size of the list.

Returns:
int

debugDumpEntries

public void debugDumpEntries()
Dump the cache entries from first to list for debugging.



Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.