All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.util.LRUList

java.lang.Object
   |
   +----w3c.util.LRUList

public abstract class LRUList
extends Object

Variable Index

 o head
 o tail

Constructor Index

 o LRUList()

Method Index

 o getHead()
Obtain the frontmost node.
 o getNext(LRUAble)
Get the next node of this list.
 o getPrev(LRUAble)
Get the previous node of this list.
 o getTail()
Obtain the backmost node.
 o remove(LRUAble)
Removes node if it's in list.
 o removeTail()
Obtain the backmost node, and remove it from list too.
 o toHead(LRUAble)
Moves node to front of list.
 o toTail(LRUAble)
Moves node to back of list.

Variables

 o head
 protected LRUNode head
 o tail
 protected LRUNode tail

Constructors

 o LRUList
 public LRUList()

Methods

 o toHead
 public abstract void toHead(LRUAble node)
Moves node to front of list. It can be a new node, or it can be an existing node.

Parameters:
node - the node
 o toTail
 public abstract void toTail(LRUAble node)
Moves node to back of list. It can be a new node, or it can be an existing node.

Parameters:
node - the node
 o remove
 public abstract LRUAble remove(LRUAble node)
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.

Parameters:
node - The node to remove
Returns:
the same node
 o getTail
 public abstract LRUAble getTail()
Obtain the backmost node.

Returns:
the backmost node, or null if list is empty
 o getHead
 public abstract LRUAble getHead()
Obtain the frontmost node.

Returns:
the frontmost node, or null if list is empty
 o removeTail
 public abstract LRUAble removeTail()
Obtain the backmost node, and remove it from list too.

Returns:
the backmost node, or null if list is empty
 o getNext
 public abstract LRUAble getNext(LRUAble node)
Get the next node of this list.

Returns:
The next node, or null if this one was last.
 o getPrev
 public abstract LRUAble getPrev(LRUAble node)
Get the previous node of this list.

Returns:
The previous node, or null if this one was last.

All Packages  Class Hierarchy  This Package  Previous  Next  Index