public abstract class AbstractAutomaton extends Object implements Automaton
Automaton
interface.Modifier and Type | Field and Description |
---|---|
protected String |
pattern |
protected int |
patternLength |
protected String |
word |
protected int |
wordLength |
Modifier | Constructor and Description |
---|---|
protected |
AbstractAutomaton(String pattern,
String word) |
Modifier and Type | Method and Description |
---|---|
String |
getPattern()
Returns the pattern.
|
String |
getWord()
Returns the word.
|
Automaton |
step(String symbols)
Returns a new automaton transitioned to another state.
|
Automaton |
stepUntilWordAccepted(String symbols)
Returns a new automaton transitioned to another state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getScore, isWordAccepted, isWordRejected, step
protected final String pattern
protected final String word
protected final int patternLength
protected final int wordLength
protected AbstractAutomaton(String pattern, String word)
NullPointerException
- if pattern
is null;NullPointerException
- if word
is null;public String getPattern()
Automaton
getPattern
in interface Automaton
public Automaton step(String symbols)
Automaton
step
in interface Automaton
NullPointerException
- if symbols
is null;public Automaton stepUntilWordAccepted(String symbols)
Automaton
stepUntilWordAccepted
in interface Automaton
NullPointerException
- if symbols
is null;Copyright © 2017. All rights reserved.