scanner
Class AutomataDefinition

java.lang.Object
  extended byscanner.AutomataDefinition

public class AutomataDefinition
extends java.lang.Object

This class enables the description of automatas. Those definitions are described using states and transitions between those states.

See Also:
Transition, State

Constructor Summary
AutomataDefinition()
          Constructs a new definition.
AutomataDefinition(State startingState)
          Creates a new definition with the given starting state.
 
Method Summary
 void copyFrom(AutomataDefinition definition)
          Copy the given definition to this one.
 State getStartingState()
          Returns the starting state of this automata.
 java.lang.String toString()
          Returns a string representation of this object.
 AutomataDefinition union(AutomataDefinition def)
          Realize an union between this definition and the given one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutomataDefinition

public AutomataDefinition()
Constructs a new definition.


AutomataDefinition

public AutomataDefinition(State startingState)
Creates a new definition with the given starting state.

Parameters:
startingState - The starting state of this definition.
Method Detail

getStartingState

public State getStartingState()
Returns the starting state of this automata.

Returns:
The starting state of this automata.

union

public AutomataDefinition union(AutomataDefinition def)
Realize an union between this definition and the given one.

Parameters:
def - The definition to be unioned with this one.
Returns:
A reference on this once unioned.

copyFrom

public void copyFrom(AutomataDefinition definition)
Copy the given definition to this one. This is equivalent to set the starting state of this definition to the starting state of the specified one.

Parameters:
definition - The definition of an automata.

toString

public java.lang.String toString()
Returns a string representation of this object.

Returns:
A string representation of this object.