edu.umd.cfar.lamp.viper.gui.data
Class IntegerFSM

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.gui.data.StringParserFSM
      extended byedu.umd.cfar.lamp.viper.gui.data.IntegerFSM

public class IntegerFSM
extends StringParserFSM


Constructor Summary
IntegerFSM()
           
 
Method Summary
 java.lang.String getValidString()
          Gets a valid version from the current state.
 boolean pushDown(char c)
          Parse the next character.
 void reset()
          Reset to the start state.
 java.lang.String toString()
          Gets the current parsed characters.
 
Methods inherited from class edu.umd.cfar.lamp.viper.gui.data.StringParserFSM
addString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerFSM

public IntegerFSM()
Method Detail

pushDown

public boolean pushDown(char c)
Description copied from class: StringParserFSM
Parse the next character. This isn't terribly Unicode safe, now, is it?

Specified by:
pushDown in class StringParserFSM
Parameters:
c - the character to push onto the stack
Returns:
true if the character was added to the stack

reset

public void reset()
Description copied from class: StringParserFSM
Reset to the start state.

Specified by:
reset in class StringParserFSM

toString

public java.lang.String toString()
Description copied from class: StringParserFSM
Gets the current parsed characters. It should be a valid string of the language the FSM represents, or an empty string. It is up to the implementor to decide what to do with a partial string.

Specified by:
toString in class StringParserFSM
Returns:
the current parsed characters

getValidString

public java.lang.String getValidString()
Description copied from class: StringParserFSM
Gets a valid version from the current state. For example, a floating point with toString as "12e" would return the valid part "12", or a bounding box parsed as "12 13 4" might return "12 13 4 0" or "".

Overrides:
getValidString in class StringParserFSM
Returns:
Default is to return the value of 'toString' method