cs4099
Class StateStack

java.lang.Object
  extended by cs4099.StateStack

public class StateStack
extends java.lang.Object

This class stores a LinkedList of states with references to their parents. New states are added to and removed from the head of the linked list.

Author:
David Newton
See Also:
State

Constructor Summary
StateStack()
          Creates a new StateStack
 
Method Summary
 void add(State state)
          Adds a state to the stack
 State get()
          Removes the first state from the stack
 boolean isEmpty()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateStack

public StateStack()
Creates a new StateStack

Method Detail

add

public void add(State state)
Adds a state to the stack


get

public State get()
Removes the first state from the stack


isEmpty

public boolean isEmpty()