static class LetterToSoundImpl.DecisionState extends Object implements LetterToSoundImpl.State
State
that represents a decision to be made.LetterToSoundImpl.FinalState
Modifier and Type | Field and Description |
---|---|
(package private) char |
c |
(package private) int |
index |
(package private) int |
qfalse |
(package private) int |
qtrue |
(package private) static int |
TYPE |
Constructor and Description |
---|
DecisionState(int index,
char c,
int qtrue,
int qfalse)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compare(LetterToSoundImpl.State other)
Compares this state to another state for debugging purposes.
|
int |
getNextState(char[] chars)
Gets the next state to go to based upon the given character
sequence.
|
static LetterToSoundImpl.State |
loadBinary(DataInputStream dis)
Loads a
DecisionState object from the given
input stream. |
String |
toString()
Outputs this
State as though it came from the
text input file. |
void |
writeBinary(DataOutputStream dos)
Writes this
State to the given output stream. |
static final int TYPE
int index
char c
int qtrue
int qfalse
public DecisionState(int index, char c, int qtrue, int qfalse)
index
- the index into a string for comparison to cc
- the character to match in a string at indexqtrue
- the state to go to in the state machine on a matchqfalse
- the state to go to in the state machine on no matchpublic int getNextState(char[] chars)
chars
- the characters for comparisonpublic void writeBinary(DataOutputStream dos) throws IOException
State
to the given output stream.writeBinary
in interface LetterToSoundImpl.State
dos
- the data output streamIOException
- if an error occurspublic static LetterToSoundImpl.State loadBinary(DataInputStream dis) throws IOException
DecisionState
object from the given
input stream.dis
- the data input streamIOException
- if an error occurspublic boolean compare(LetterToSoundImpl.State other)
compare
in interface LetterToSoundImpl.State
other
- the other state to compare againstWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses