Package ca.phon.fsa

Class FSATransition<T>

java.lang.Object
ca.phon.fsa.FSATransition<T>
Direct Known Subclasses:
AnythingTransition, CVSeqTransition, PhonexTransition, StressMatcherTransition

public abstract class FSATransition<T> extends Object
  • Constructor Details

    • FSATransition

      public FSATransition()
  • Method Details

    • copyTransitionInfo

      public static void copyTransitionInfo(FSATransition<?> src, FSATransition<?> dest)
      Copy information from only transition into another
      Parameters:
      src -
      dest -
    • setupTransition

      public static void setupTransition(FSATransition<?> transition, String firstState, String toState, String image, TransitionType type, OffsetType offsetType, Collection<Integer> startGroups, Collection<Integer> matcherGroups)
      Setup transition with given information
      Parameters:
      transition -
      firstState -
      toState -
      image -
      type -
      offsetType -
      startGroups -
      matcherGroups -
    • follow

      public abstract boolean follow(FSAState<T> currentState)
      Determines if the fsa will follow the transition given the current running state.
      Parameters:
      currentState - the current machine state
      Returns:
      true if this transition can be followed given the current state, false otherwise
    • getFirstState

      public String getFirstState()
    • setFirstState

      public void setFirstState(String firstState)
    • getToState

      public String getToState()
    • setToState

      public void setToState(String toState)
    • getImage

      public String getImage()
    • setImage

      public void setImage(String image)
    • getMatchLength

      public int getMatchLength()
      The number of items matched by this transition default is 1.
      Returns:
      number of items to match on the tape
    • getInitGroups

      public Set<Integer> getInitGroups()
      Get the matcher groups started by this transition. Every time this transition is followed it will begin a new match for the indicated groups.
      Returns:
      the (live) list of matcher groups started by following this transition
    • getMatcherGroups

      public Set<Integer> getMatcherGroups()
      Get the matcher groups that following this transition modifies.
      Returns:
      the (live) list of matcher groups modified by this transition
    • getType

      public TransitionType getType()
      Get type
      Returns:
      transition type - default NORMAL
    • setType

      public void setType(TransitionType type)
      Set transition type.
      Parameters:
      type -
    • getOffsetType

      public OffsetType getOffsetType()
    • setOffsetType

      public void setOffsetType(OffsetType offsetType)