laser.regularlanguage.fsa.test
Class AbstractMutableFSAFactory<L extends LabelInterface>

java.lang.Object
  extended by laser.regularlanguage.fsa.test.AbstractMutableFSAFactory<L>
Direct Known Subclasses:
AbstractStringMutableFSAFactory

public abstract class AbstractMutableFSAFactory<L extends LabelInterface>
extends java.lang.Object


Field Summary
protected  AlphabetFactoryInterface<L> alphabetFactory_
           
protected  FSAFactoryInterface<L> fsaFactory_
           
protected  MutableFSAInterface<L> prototypeFSA_
           
 
Constructor Summary
protected AbstractMutableFSAFactory()
           
 
Method Summary
 AlphabetInterface<L> createAlphabetInstance()
          Creates a new empty Alphabet.
protected  MutableFSAInterface<L> createEmptyDFA()
           
 FSAEpsilonTransitionInterface<L> createFSAEpsilonTransitionInstance(MutableFSAInterface<L> fsa, FSAStateInterface<L> source, FSAStateInterface<L> target)
          Creates a new FSAEpsilonTransitionInterface from the given source to the given target within the specified FSA.
protected abstract  FSAFactoryInterface<L> createFSAFactory()
           
 FSALabelPatternTransitionInterface<L> createFSALabelPatternTransitionInstance(MutableFSAInterface<L> fsa, FSAStateInterface<L> source, FSAStateInterface<L> target, LabelPatternInterface<L> p)
          Creates a new FSALabelPatternTransitionInterface from the given source to the given target on the given label pattern within the specified FSA.
 FSALabelTransitionInterface<L> createFSALabelTransitionInstance(MutableFSAInterface<L> fsa, FSAStateInterface<L> source, FSAStateInterface<L> target, L l)
          Creates a new FSALabelTransitionInterface from the given source to the given target on the given label within the specified FSA.
 FSAStateInterface<L> createFSAStateInstance(MutableFSAInterface<L> fsa)
          Creates a new FSAStateInterface within the given FSA.
protected  MutableFSAInterface<L> createLabelDFA()
           
protected  MutableFSAInterface<L> createLabelEpsilonFreeNFA()
           
abstract  L createLabelInstance()
          Creates a new Label.
protected  MutableFSAInterface<L> createLabelPatternDFA()
           
abstract  LabelPatternInterface<L> createLabelPatternInstance()
          Creates a valid LabelPattern.
 MutableFSAInterface<L> createMutableFSAInstance()
          Creates a new MutableFSA.
protected  MutableFSAInterface<L> createStarDFA()
           
protected  MutableFSAInterface<L> createStarNFA()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fsaFactory_

protected final FSAFactoryInterface<L extends LabelInterface> fsaFactory_

alphabetFactory_

protected final AlphabetFactoryInterface<L extends LabelInterface> alphabetFactory_

prototypeFSA_

protected final MutableFSAInterface<L extends LabelInterface> prototypeFSA_
Constructor Detail

AbstractMutableFSAFactory

protected AbstractMutableFSAFactory()
Method Detail

createFSAFactory

protected abstract FSAFactoryInterface<L> createFSAFactory()

createMutableFSAInstance

public MutableFSAInterface<L> createMutableFSAInstance()
Creates a new MutableFSA. POSTCONDITION:

Returns:
A new mutable FSA

createAlphabetInstance

public AlphabetInterface<L> createAlphabetInstance()
Creates a new empty Alphabet. POSTCONDITIONS:


createLabelInstance

public abstract L createLabelInstance()
Creates a new Label. POSTCONDITIONS:

Returns:
The new label

createLabelPatternInstance

public abstract LabelPatternInterface<L> createLabelPatternInstance()
Creates a valid LabelPattern. POSTCONDITION: The LabelPattern must be non-null.

Returns:
A valid label pattern

createFSAStateInstance

public FSAStateInterface<L> createFSAStateInstance(MutableFSAInterface<L> fsa)
Creates a new FSAStateInterface within the given FSA. POSTCONDITIONS:

Parameters:
fsa - The FSA that will contain the new state
Returns:
The new state

createFSAEpsilonTransitionInstance

public FSAEpsilonTransitionInterface<L> createFSAEpsilonTransitionInstance(MutableFSAInterface<L> fsa,
                                                                           FSAStateInterface<L> source,
                                                                           FSAStateInterface<L> target)
Creates a new FSAEpsilonTransitionInterface from the given source to the given target within the specified FSA. POSTCONDITIONS:

Parameters:
fsa - The FSA that will contain the new epsilon transition
source - The source for the new epsilon transition
target - The target for the new epsilon transition
Returns:
The new epsilon transition

createFSALabelTransitionInstance

public FSALabelTransitionInterface<L> createFSALabelTransitionInstance(MutableFSAInterface<L> fsa,
                                                                       FSAStateInterface<L> source,
                                                                       FSAStateInterface<L> target,
                                                                       L l)
Creates a new FSALabelTransitionInterface from the given source to the given target on the given label within the specified FSA. POSTCONDITIONS:

Parameters:
fsa - The FSA that will contain the new label transition
source - The source for the new label transition
target - The target for the new label transition
l - The label for the new label transition
Returns:
The new label transition

createFSALabelPatternTransitionInstance

public FSALabelPatternTransitionInterface<L> createFSALabelPatternTransitionInstance(MutableFSAInterface<L> fsa,
                                                                                     FSAStateInterface<L> source,
                                                                                     FSAStateInterface<L> target,
                                                                                     LabelPatternInterface<L> p)
Creates a new FSALabelPatternTransitionInterface from the given source to the given target on the given label pattern within the specified FSA. POSTCONDITIONS:

Parameters:
fsa - The FSA that will contain the new label pattern transition
source - The source for the new label pattern transition
target - The target for the new label pattern transition
p - The label pattern for the new label pattern transition
Returns:
The new label pattern transition

createEmptyDFA

protected MutableFSAInterface<L> createEmptyDFA()

createLabelDFA

protected MutableFSAInterface<L> createLabelDFA()

createLabelPatternDFA

protected MutableFSAInterface<L> createLabelPatternDFA()

createStarDFA

protected MutableFSAInterface<L> createStarDFA()

createLabelEpsilonFreeNFA

protected MutableFSAInterface<L> createLabelEpsilonFreeNFA()

createStarNFA

protected MutableFSAInterface<L> createStarNFA()