com.act365.sudoku
Class StateStack

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended bycom.act365.sudoku.StateStack
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class StateStack
extends java.util.Vector

StateStack stores state grids in a dynamically-expanding vector. The class should be used for memory-intensive state grids that are rarely references (so that performance isn't critical), such as LinearSystemState.

See Also:
Serialized Form

Constructor Summary
StateStack(int maxMoves)
          Creates a StateStack to store at most maxMoves moves.
 
Method Summary
 java.lang.Object popState(int nMoves)
           
 void pushState(java.lang.Object obj, int nMoves)
           
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

StateStack

public StateStack(int maxMoves)
Creates a StateStack to store at most maxMoves moves.

Method Detail

pushState

public void pushState(java.lang.Object obj,
                      int nMoves)
See Also:
IState.pushState(int)

popState

public java.lang.Object popState(int nMoves)
See Also:
IState.popState(int)