Class MutableFSTImpl
- java.lang.Object
-
- org.apache.pinot.segment.local.utils.nativefst.mutablefst.MutableFSTImpl
-
- All Implemented Interfaces:
MutableFST
public class MutableFSTImpl extends Object implements MutableFST
A mutable finite state transducer implementation that allows you to build mutable via the API. This is not thread safe; convert to an ImmutableFst if you need to share across multiple writer threads. Concurrently writing and reading to/from a mutable FST is supported.
-
-
Constructor Summary
Constructors Constructor Description MutableFSTImpl()
-
Method Summary
Modifier and Type Method Description MutableArcaddArc(MutableState startState, int outputSymbol, MutableState endState)voidaddPath(String word, int outputSymbol)Add a path to the FSTbooleanequals(Object o)MutableStategetStartState()Get the initial statesinthashCode()MutableStatenewStartState()voidsetStartState(MutableState start)Set the initial statevoidthrowIfInvalid()throws an exception if the FST is constructed in an invalid stateStringtoString()
-
-
-
Method Detail
-
getStartState
public MutableState getStartState()
Get the initial states- Specified by:
getStartStatein interfaceMutableFST- Returns:
-
setStartState
public void setStartState(MutableState start)
Set the initial state- Specified by:
setStartStatein interfaceMutableFST- Parameters:
start- the initial state
-
newStartState
public MutableState newStartState()
-
addArc
public MutableArc addArc(MutableState startState, int outputSymbol, MutableState endState)
-
throwIfInvalid
public void throwIfInvalid()
Description copied from interface:MutableFSTthrows an exception if the FST is constructed in an invalid state- Specified by:
throwIfInvalidin interfaceMutableFST
-
addPath
public void addPath(String word, int outputSymbol)
Description copied from interface:MutableFSTAdd a path to the FST- Specified by:
addPathin interfaceMutableFST
-
-