public final class EqualityAutomaton extends AbstractAutomaton
pattern, patternLength, word, wordLength
Constructor and Description |
---|
EqualityAutomaton(String pattern)
Constructs a new
EqualityAutomaton . |
Modifier and Type | Method and Description |
---|---|
double |
getScore()
Returns the word score.
|
boolean |
isWordAccepted()
Returns
true if the word is accepted. |
boolean |
isWordRejected()
Returns
true if the word is rejected. |
EqualityAutomaton |
step(char symbol)
Returns a new automaton transitioned to another state.
|
getPattern, getWord, step, stepUntilWordAccepted
public EqualityAutomaton(String pattern)
EqualityAutomaton
.NullPointerException
- if pattern
is null;public double getScore()
Automaton
public boolean isWordAccepted()
Automaton
true
if the word is accepted.public boolean isWordRejected()
Automaton
true
if the word is rejected.public EqualityAutomaton step(char symbol)
Automaton
Copyright © 2017. All rights reserved.