Class StateTable.Element

java.lang.Object
  extended by StateTable.Element
Enclosing class:
StateTable

public class StateTable.Element
extends java.lang.Object

Class Element represents a node in a linked list of states; two links are provided, queueLink and hashLink, so that the node can be used both in the representation of the BFS queue and in the representation of a chain in the hash table. Only one instance of Element is created for each accepting state found.


Field Summary
(package private)  StateTable.Element hashLink
          The next node in the hash chain.
(package private)  int number
          The number assigned to this state.
(package private)  StateTable.Element queueLink
          The next node in the queue.
(package private)  State state
          The state represent by this node.
 
Constructor Summary
StateTable.Element(State s)
          Create a new node containing (non-null) state s.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

State state
The state represent by this node.


queueLink

StateTable.Element queueLink
The next node in the queue.


hashLink

StateTable.Element hashLink
The next node in the hash chain.


number

int number
The number assigned to this state.

Constructor Detail

StateTable.Element

public StateTable.Element(State s)
Create a new node containing (non-null) state s. Maintain numberOfAcceptingStates to be the number of such nodes created, and print a line each time 1000 new nodes are created. Assign numbers to the states in the order they are created.