|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umd.cfar.lamp.viper.gui.data.StringParserFSM
Provides an interface for my kind of text field - the kind that won't even let you type something that isn't valid. Although I usually use FSMs to implement this, thus the name, it is by no means a constraint on the implementation. Feel free to consult whatever psychic necessary.
Constructor Summary | |
StringParserFSM()
|
Method Summary | |
boolean |
addString(java.lang.String s)
|
java.lang.String |
getValidString()
Gets a valid version from the current state. |
abstract boolean |
pushDown(char c)
Parse the next character. |
abstract void |
reset()
Reset to the start state. |
abstract java.lang.String |
toString()
Gets the current parsed characters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StringParserFSM()
Method Detail |
public abstract boolean pushDown(char c)
c
- the character to push onto the stack
true
if the character was added to the stackpublic abstract void reset()
public abstract java.lang.String toString()
public java.lang.String getValidString()
public boolean addString(java.lang.String s)
s
- the characters to try to push down
false
if any characters were not added
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |