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

java.lang.Object
  extended by laser.regularlanguage.fsa.AbstractFSATransition<L>
      extended by laser.regularlanguage.fsa.FSALabelPatternTransition<L>
Type Parameters:
L - The type of Label associated with the FSA that contains this transition.
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FSATransitionInterface<L>>, FSALabelPatternTransitionInterface<L>, FSATransitionInterface<L>, Annotatable

public class FSALabelPatternTransition<L extends LabelInterface>
extends AbstractFSATransition<L>
implements FSALabelPatternTransitionInterface<L>

This class represents transitions on a LabelPattern in FSAs of type AbstractFSA.

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, FSALabelPatternTransitionInterface, laser.alphabetinterface.labelpatterninterface.LabelPatternInterface, Serialized Form

Constructor Summary
protected FSALabelPatternTransition(int id, FSAStateInterface<L> source, LabelPatternInterface<L> labelPattern, FSAStateInterface<L> target)
          Creates a new FSALabelPatternTransition from the specified source state to the specified target state on the specified LabelPattern with the specified ID.
 
Method Summary
 LabelPatternInterface<L> getLabelPattern()
          Returns a copy of the LabelPattern of this transition.
protected  java.lang.String toStringLabel()
          Returns a String representation of the label function of this AbstractFSATransition.
 
Methods inherited from class laser.regularlanguage.fsa.AbstractFSATransition
addAnnotation, addAnnotations, compareTo, copyAnnotations, getAnnotationClasses, getAnnotationClasses, getAnnotationFilters, getAnnotations, getAnnotations, getFSA, getID, getSource, getTarget, isSelfLoop, removeAnnotation, removeAnnotations, removeAnnotations, removeAnnotations, setAnnotationFilters, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface laser.regularlanguage.fsa.FSATransitionInterface
getFSA, getID, getSource, getTarget
 
Methods inherited from interface laser.util.Annotatable
addAnnotation, addAnnotations, copyAnnotations, getAnnotationClasses, getAnnotationClasses, getAnnotationFilters, getAnnotations, getAnnotations, removeAnnotation, removeAnnotations, removeAnnotations, removeAnnotations, setAnnotationFilters
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

FSALabelPatternTransition

protected FSALabelPatternTransition(int id,
                                    FSAStateInterface<L> source,
                                    LabelPatternInterface<L> labelPattern,
                                    FSAStateInterface<L> target)
Creates a new FSALabelPatternTransition from the specified source state to the specified target state on the specified LabelPattern with the specified ID.

This constructor should only be called by the AbstractFSAFactory._createFSALabelPatternTransitionInterface(int, laser.regularlanguage.fsa.FSAStateInterface, laser.alphabet.labelpattern.LabelPatternInterface, laser.regularlanguage.fsa.FSAStateInterface, java.lang.Object...) method.

Precondition: source, target, and labelPattern are not null, source and target are a part of the same FSA.

Parameters:
id - The ID.
source - The state that is the source of this transition.
labelPattern - The LabelPattern of this transition.
target - The state that is the target of this transition.
Method Detail

getLabelPattern

public LabelPatternInterface<L> getLabelPattern()
Returns a copy of the LabelPattern of this transition. No references are maintained between the returned LabelPattern and the LabelPattern on the transition, thus modifying the returned LabelPattern has no effect on the LabelPattern of the transition and vice versa.

Specified by:
getLabelPattern in interface FSALabelPatternTransitionInterface<L extends LabelInterface>
Returns:
A copy of the LabelPattern of this transition.

toStringLabel

protected java.lang.String toStringLabel()
Returns a String representation of the label function of this AbstractFSATransition.

Specified by:
toStringLabel in class AbstractFSATransition<L extends LabelInterface>
Returns:
A String representation of the label function