org.jicengine.expression
Class NumberParser

java.lang.Object
  extended byorg.jicengine.expression.StaticValueParser
      extended byorg.jicengine.expression.NumberParser
All Implemented Interfaces:
Parser

public class NumberParser
extends StaticValueParser

Author:
.timo

Field Summary
static char DECIMAL_SEPARATOR
           
static java.lang.String DECIMAL_SEPARATOR_STRING
           
static char DOUBLE_MARKER_1
           
static char DOUBLE_MARKER_2
           
static char FLOAT_MARKER_1
           
static char FLOAT_MARKER_2
           
static NumberParser INSTANCE
           
static char LONG_MARKER_1
           
static char LONG_MARKER_2
           
static char NEGATIVE_SIGN
           
 
Fields inherited from interface org.jicengine.expression.Parser
ARRAY_LENGTH_END, ARRAY_LENGTH_START, BOOLEAN_FALSE, BOOLEAN_TRUE, METHOD_PARAMS_END, METHOD_PARAMS_START, OPERATION_SEPARATOR, STRING_MARKER
 
Constructor Summary
NumberParser()
           
 
Method Summary
protected  java.lang.Object parseValue(java.lang.String expression)
           
protected  java.lang.Number toNumber(java.lang.String expression)
           
 
Methods inherited from class org.jicengine.expression.StaticValueParser
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final NumberParser INSTANCE

NEGATIVE_SIGN

public static final char NEGATIVE_SIGN
See Also:
Constant Field Values

DECIMAL_SEPARATOR

public static final char DECIMAL_SEPARATOR
See Also:
Constant Field Values

DECIMAL_SEPARATOR_STRING

public static final java.lang.String DECIMAL_SEPARATOR_STRING

FLOAT_MARKER_1

public static final char FLOAT_MARKER_1

FLOAT_MARKER_2

public static final char FLOAT_MARKER_2

LONG_MARKER_1

public static final char LONG_MARKER_1

LONG_MARKER_2

public static final char LONG_MARKER_2

DOUBLE_MARKER_1

public static final char DOUBLE_MARKER_1

DOUBLE_MARKER_2

public static final char DOUBLE_MARKER_2
Constructor Detail

NumberParser

public NumberParser()
Method Detail

parseValue

protected java.lang.Object parseValue(java.lang.String expression)
                               throws SyntaxException
Specified by:
parseValue in class StaticValueParser
Throws:
SyntaxException

toNumber

protected java.lang.Number toNumber(java.lang.String expression)
                             throws java.lang.NumberFormatException
Throws:
java.lang.NumberFormatException