laser.regularlanguage.fsa
Class AbstractFSATransitionTable<L extends LabelInterface>

java.lang.Object
  extended by laser.regularlanguage.fsa.AbstractFSATransitionTable<L>
Type Parameters:
L - The type of Label associated with the FSA that this table is associated with.
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DFATransitionTable, FSATransitionTable

public abstract class AbstractFSATransitionTable<L extends LabelInterface>
extends java.lang.Object
implements java.io.Serializable

A helper class for RunnableFSAs that allows computation to be performed on them.

Subclasses of this class must have a constructor that takes a single RunnableFSA parameter from which the table is built.

Note that this class is not synchronized, and attempts to use it with non-sequential code may result in unexpected behavior.

Author:
Nathan Jokel (laser-software@cs.umass.edu)
See Also:
RunnableFSA, Serialized Form

Constructor Summary
protected AbstractFSATransitionTable()
          No argument constructor for use by subclasses.
 
Method Summary
protected abstract  java.util.SortedSet<FSAStateInterface<L>> epsilonClosure(FSAStateInterface<L> state)
          A helper method for the RunnableFSA.getInitialConfigurationForwards() method.
protected abstract  java.util.SortedSet<FSAStateInterface<L>> moveClosure(FSAStateInterface<L> state, L label)
          A helper method for the AbstractRunnableFSA.runForwards(java.util.SortedSet>, L) method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFSATransitionTable

protected AbstractFSATransitionTable()
No argument constructor for use by subclasses.

Method Detail

epsilonClosure

protected abstract java.util.SortedSet<FSAStateInterface<L>> epsilonClosure(FSAStateInterface<L> state)
A helper method for the RunnableFSA.getInitialConfigurationForwards() method.

Precondition: state must not be null and must be a state in the FSA.

See Also:
RunnableFSA.getInitialConfigurationForwards()

moveClosure

protected abstract java.util.SortedSet<FSAStateInterface<L>> moveClosure(FSAStateInterface<L> state,
                                                                         L label)
A helper method for the AbstractRunnableFSA.runForwards(java.util.SortedSet>, L) method.

Precondition: state and label must not be null, state must be a state in the FSA, label must equal a Label in the Alphabet of the FSA.

See Also:
AbstractRunnableFSA.runForwards(java.util.SortedSet>, L)