|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.NumberParser
public class NumberParser
Class that provides a static method to parse a string and return a double.
No constructor is needed because the class is only used in static context.
Field Summary | |
---|---|
(package private) static boolean |
printLog
Flag to enable debug message printing for this class. |
Constructor Summary | |
---|---|
NumberParser()
|
Method Summary | |
---|---|
private static void |
log(java.lang.String message)
Prints debug information to stdout when printLog is set to true. |
static double |
parseNumber(java.lang.String string)
Addresses issues with the standard parsing method of NumberFormat by verifying the parse position after parsing to ensure that all the input was parsed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final boolean printLog
Constructor Detail |
---|
public NumberParser()
Method Detail |
---|
public static double parseNumber(java.lang.String string) throws java.text.ParseException
string
- the string to be parsed
java.text.ParseException
- the parse exceptionprivate static void log(java.lang.String message)
message
- the message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |