org.w3c.util
Class AsyncLRUList

java.lang.Object
  extended by org.w3c.util.LRUList
      extended by org.w3c.util.AsyncLRUList

public class AsyncLRUList
extends LRUList


Field Summary
 
Fields inherited from class org.w3c.util.LRUList
head, tail
 
Constructor Summary
AsyncLRUList()
           
 
Method Summary
 LRUAble getHead()
          Obtain the frontmost node.
 LRUAble getNext(LRUAble node)
          Get the next node of this list.
 LRUAble getPrev(LRUAble node)
          Get the previous node of this list.
 LRUAble getTail()
          Obtain the backmost node.
 LRUAble remove(LRUAble node)
          Removes node if it's in list.
 LRUAble removeTail()
          Obtain the backmost node, and remove it from list too.
 void toHead(LRUAble node)
          Moves node to front of list.
 void toTail(LRUAble node)
          Moves node to back of list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncLRUList

public AsyncLRUList()
Method Detail

toHead

public final void toHead(LRUAble node)
Description copied from class: LRUList
Moves node to front of list. It can be a new node, or it can be an existing node.

Specified by:
toHead in class LRUList
Parameters:
node - the node

toTail

public final void toTail(LRUAble node)
Description copied from class: LRUList
Moves node to back of list. It can be a new node, or it can be an existing node.

Specified by:
toTail in class LRUList
Parameters:
node - the node

remove

public final LRUAble remove(LRUAble node)
Description copied from class: LRUList
Removes node if it's in list. Does nothing if it's not. When a node is removed, both its links are set to null.

Specified by:
remove in class LRUList
Parameters:
node - The node to remove
Returns:
the same node

getTail

public final LRUAble getTail()
Description copied from class: LRUList
Obtain the backmost node.

Specified by:
getTail in class LRUList
Returns:
the backmost node, or null if list is empty

getHead

public final LRUAble getHead()
Description copied from class: LRUList
Obtain the frontmost node.

Specified by:
getHead in class LRUList
Returns:
the frontmost node, or null if list is empty

removeTail

public final LRUAble removeTail()
Description copied from class: LRUList
Obtain the backmost node, and remove it from list too.

Specified by:
removeTail in class LRUList
Returns:
the backmost node, or null if list is empty

getNext

public final LRUAble getNext(LRUAble node)
Description copied from class: LRUList
Get the next node of this list.

Specified by:
getNext in class LRUList
Returns:
The next node, or null if this one was last.

getPrev

public final LRUAble getPrev(LRUAble node)
Description copied from class: LRUList
Get the previous node of this list.

Specified by:
getPrev in class LRUList
Returns:
The previous node, or null if this one was last.