public class FSMState extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Set<Lookup> |
lookupSet |
protected int |
myIndex
The unique id of this state.
|
protected DefaultGazetteer.CharMap |
transitionFunction
The transition function of this state.
|
Constructor and Description |
---|
FSMState(DefaultGazetteer owner)
Constructs a new FSMState object and adds it to the list of
states of the
DefaultGazetteer provided as owner. |
Modifier and Type | Method and Description |
---|---|
void |
addLookup(Lookup lookup)
Adds a new looup description to this state's lookup descriptions set
|
String |
getEdgesGML()
Returns a GML (Graph Modelling Language) representation of the edges
emerging from this state.
|
int |
getIndex()
Returns the unique ID of this state.
|
Set<Lookup> |
getLookupSet()
Returns a set of
Lookup objects describing the types of lookups
the phrase for which this state is the final one belongs to |
boolean |
isFinal()
Checks whether this state is a final one
|
FSMState |
next(char chr)
This method is used to access the transition function of this state.
|
void |
put(char chr,
FSMState state)
Adds a new value to the transition function
|
void |
removeLookup(Lookup lookup)
Removes a looup description from this state's lookup descriptions set
|
protected DefaultGazetteer.CharMap transitionFunction
protected int myIndex
public FSMState(DefaultGazetteer owner)
DefaultGazetteer
provided as owner.owner
- a DefaultGazetteer
objectpublic FSMState next(char chr)
public String getEdgesGML()
public boolean isFinal()
public Set<Lookup> getLookupSet()
Lookup
objects describing the types of lookups
the phrase for which this state is the final one belongs topublic void addLookup(Lookup lookup)
public void removeLookup(Lookup lookup)
public int getIndex()