ListStack
Class Cell

java.lang.Object
  |
  +--ListStack.Cell

public class Cell
extends java.lang.Object

Cell models one cell used to assemble a linked list.


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

Constructor Detail

Cell

public Cell(java.lang.Object value,
            Cell link)
Constructor Cell builds a new cell
Parameters:
value - - the value inserted in the cell
link - - the cell that is chained to this new cell
Method Detail

getVal

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

getNext

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

setNext

public void setNext(Cell link)
setNext resets the address of the cell chained to this one
Parameters:
link - - the address of the Cell that is chained to this one