DoubleLink
Class DoubleCell

java.lang.Object
  |
  +--DoubleLink.DoubleCell

public class DoubleCell
extends java.lang.Object

DoubleCell models a cell with double links; it is used to assemble doubly linked list.


Constructor Summary
DoubleCell(java.lang.Object value, DoubleCell prevlink, DoubleCell nextlink)
          Constructor DoubleCell builds a new cell
 
Method Summary
 DoubleCell getNext()
          getNext returns the address of the next cell chained to this one
 DoubleCell getPrev()
          getPrev returns the address of the previous cell chained to this one
 java.lang.Object getVal()
          getVal returns the value held in the cell
 void setNext(DoubleCell link)
          setNext resets the address of the successor cell chained to this one
 void setPrev(DoubleCell link)
          setPrev resets the address of the predecessor cell to this one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleCell

public DoubleCell(java.lang.Object value,
                  DoubleCell prevlink,
                  DoubleCell nextlink)
Constructor DoubleCell builds a new cell
Parameters:
value - - the value inserted in the cell
prevlink - - the predecessor cell to this one
nextlink - - the successor cell to this one
Method Detail

getVal

public java.lang.Object getVal()
getVal returns the value held in the cell

getPrev

public DoubleCell getPrev()
getPrev returns the address of the previous cell chained to this one

getNext

public DoubleCell getNext()
getNext returns the address of the next cell chained to this one

setPrev

public void setPrev(DoubleCell link)
setPrev resets the address of the predecessor cell to this one
Parameters:
link - - the address of the new predecessor DoubleCell

setNext

public void setNext(DoubleCell link)
setNext resets the address of the successor cell chained to this one
Parameters:
link - - the address of the new successor DoubleCell