laser.regularlanguage.fsa
Class StringDFAFactory

java.lang.Object
  extended by laser.regularlanguage.fsa.AbstractFSAFactory<StringLabel>
      extended by laser.regularlanguage.fsa.StringFSAFactory
          extended by laser.regularlanguage.fsa.StringDFAFactory
All Implemented Interfaces:
java.io.Serializable, FSAFactoryInterface<StringLabel>

public class StringDFAFactory
extends StringFSAFactory

A factory that creates deterministic finite state automata (DFAs) of type AbstractFSA that are associated with StringLabels. 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, StringLabel, Serialized Form

Field Summary
 
Fields inherited from class laser.regularlanguage.fsa.AbstractFSAFactory
alphabetFactory
 
Constructor Summary
StringDFAFactory()
          Creates an instance of StringDFAFactory.
 
Method Summary
 MutableFSAInterface<StringLabel> createMutableFSAInterface(AlphabetInterface<StringLabel> alphabet, java.lang.Object... args)
          Creates a mutable FSA from the specified arguments.
 
Methods inherited from class laser.regularlanguage.fsa.AbstractFSAFactory
_copyStateInto, _copyTransitionInto, _createFSAEpsilonTransitionInterface, _createFSALabelPatternTransitionInterface, _createFSALabelTransitionInterface, _createFSAStateInterface, _internalCreateMutableDFAInterface, _internalCreateMutableFSAInterface, _internalGetRunnableDFA, _internalGetRunnableFSA, getAlphabetFactory, getCreateArgs, getCreateArgs, getCreateArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringDFAFactory

public StringDFAFactory()
Creates an instance of StringDFAFactory.

Method Detail

createMutableFSAInterface

public MutableFSAInterface<StringLabel> createMutableFSAInterface(AlphabetInterface<StringLabel> alphabet,
                                                                  java.lang.Object... args)
Creates a mutable FSA from the specified arguments.

PRECONDITIONS:

Specified by:
createMutableFSAInterface in interface FSAFactoryInterface<StringLabel>
Overrides:
createMutableFSAInterface in class AbstractFSAFactory<StringLabel>
Parameters:
alphabet - The alphabet for the new FSA.
args - The arguments (optional).
Returns:
The mutable FSA.
Throws:
java.lang.IllegalArgumentException - A mutable FSA can not be created from the specified arguments.