laser.regularlanguage.fsa
Class IndexedFSAFactory

java.lang.Object
  extended by laser.regularlanguage.fsa.AbstractFSAFactory<IndexedLabel>
      extended by laser.regularlanguage.fsa.IndexedFSAFactory
All Implemented Interfaces:
java.io.Serializable, FSAFactoryInterface<IndexedLabel>
Direct Known Subclasses:
IndexedDFAFactory

public class IndexedFSAFactory
extends AbstractFSAFactory<IndexedLabel>

A factory that creates finite state automata (FSAs) of type AbstractFSA that are associated with IndexedLabels. This is a factory as in the design pattern, (Design Patterns, Gamma, Helm, Johnson, and Vlissides, pp 87, 107, 1995).

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:
AbstractFSA, IndexedLabel, Serialized Form

Field Summary
 
Fields inherited from class laser.regularlanguage.fsa.AbstractFSAFactory
alphabetFactory
 
Constructor Summary
IndexedFSAFactory()
          Creates an instance of IndexedFSAFactory.
 
Method Summary
protected  RunnableDFAInterface<IndexedLabel> _internalGetRunnableDFA(MutableDFA<IndexedLabel> dfa)
          Instantiates a RunnableDFA from the given MutableDFA.
protected  RunnableFSAInterface<IndexedLabel> _internalGetRunnableFSA(MutableFSA<IndexedLabel> fsa)
          Instantiates a RunnableFSA from the given MutableFSA.
 
Methods inherited from class laser.regularlanguage.fsa.AbstractFSAFactory
_copyStateInto, _copyTransitionInto, _createFSAEpsilonTransitionInterface, _createFSALabelPatternTransitionInterface, _createFSALabelTransitionInterface, _createFSAStateInterface, _internalCreateMutableDFAInterface, _internalCreateMutableFSAInterface, createMutableFSAInterface, getAlphabetFactory, getCreateArgs, getCreateArgs, getCreateArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedFSAFactory

public IndexedFSAFactory()
Creates an instance of IndexedFSAFactory.

Method Detail

_internalGetRunnableFSA

protected RunnableFSAInterface<IndexedLabel> _internalGetRunnableFSA(MutableFSA<IndexedLabel> fsa)
Instantiates a RunnableFSA from the given MutableFSA. This method should only be called by the MutableFSA.getRunnableFSA() method of mutable FSAs that were created by this factory.

Precondition: fsa is not null.

Overrides:
_internalGetRunnableFSA in class AbstractFSAFactory<IndexedLabel>
Parameters:
fsa - The mutable FSA.
See Also:
MutableFSA.getRunnableFSA()

_internalGetRunnableDFA

protected RunnableDFAInterface<IndexedLabel> _internalGetRunnableDFA(MutableDFA<IndexedLabel> dfa)
Instantiates a RunnableDFA from the given MutableDFA. This method should only be called by the MutableDFA.getRunnableFSA() method.

Precondition: dfa is not null.

Overrides:
_internalGetRunnableDFA in class AbstractFSAFactory<IndexedLabel>
Parameters:
dfa - The mutable DFA.
See Also:
MutableDFA.getRunnableFSA()