Class State

java.lang.Object
  extended by State

public class State
extends Object

State for a DFA. Attributes of a state include its Name (an immutable unique identifier within the FA), its Label (an immutable comment regarding the intent of the state), and its Activity Counter (an integer valued variable typically used for collecting statistics).

Version:
CSTheory (1)
Author:
Dr. Jody Paul

Constructor Summary
State(String name, String label)
          Constructs a state with the specified name and label.
 
Method Summary
 long counter()
          Retrieves the activity counter of this state.
 void increment()
          Increments the activity counter of this state.
 String label()
          Retrieves the label of this state.
 String name()
          Retrieves the name of this state.
 void reset()
          Resets the activity counter of this state to 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

State

public State(String name,
             String label)
Constructs a state with the specified name and label. The activity counter is set to zero.

Parameters:
name - the name for this state
label - the label for this state
Method Detail

counter

public long counter()
Retrieves the activity counter of this state.

Returns:
the current counter value

increment

public void increment()
Increments the activity counter of this state.


label

public String label()
Retrieves the label of this state.

Returns:
the label of this state

name

public String name()
Retrieves the name of this state.

Returns:
the name of this state

reset

public void reset()
Resets the activity counter of this state to 0.