Package ca.phon.fsa
Class FSATransition<T>
java.lang.Object
ca.phon.fsa.FSATransition<T>
- Direct Known Subclasses:
AnythingTransition
,CVSeqTransition
,PhonexTransition
,StressMatcherTransition
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyTransitionInfo
(FSATransition<?> src, FSATransition<?> dest) Copy information from only transition into anotherabstract boolean
Determines if the fsa will follow the transition given the current running state.getImage()
Get the matcher groups started by this transition.Get the matcher groups that following this transition modifies.int
The number of items matched by this transition default is 1.getType()
Get typevoid
setFirstState
(String firstState) void
void
setOffsetType
(OffsetType offsetType) void
setToState
(String toState) void
setType
(TransitionType type) Set transition type.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
-
Constructor Details
-
FSATransition
public FSATransition()
-
-
Method Details
-
copyTransitionInfo
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
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
-
setFirstState
-
getToState
-
setToState
-
getImage
-
setImage
-
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
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
Get the matcher groups that following this transition modifies.- Returns:
- the (live) list of matcher groups modified by this transition
-
getType
Get type- Returns:
- transition type - default
NORMAL
-
setType
Set transition type.- Parameters:
type
-
-
getOffsetType
-
setOffsetType
-