    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.util.LRUList

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

public abstract class LRUList
extends Object

##

head
tail

##

LRUList()

##

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

##

head

     protected LRUNode head

tail

     protected LRUNode tail

##

LRUList

     public LRUList()

##

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

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

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

getTail

     public abstract LRUAble getTail()

  Obtain the backmost node.

  Returns:
    the backmost node, or null if list is empty

getHead

     public abstract LRUAble getHead()

  Obtain the frontmost node.

  Returns:
    the frontmost node, or null if list is empty

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

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.

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