|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.martiansoftware.jsap.StringParser
com.martiansoftware.jsap.stringparsers.DoubleStringParser
public class DoubleStringParser
A StringParser
for parsing Doubles. The parse() method delegates the actual
parsing to new Double(String). If a NumberFormatException is thrown by new
Double(String), it
is encapsulated in a ParseException and re-thrown.
StringParser
,
Double
Constructor Summary | |
---|---|
DoubleStringParser()
Deprecated. Use getParser() or, even better, JSAP.DOUBLE_PARSER . |
Method Summary | |
---|---|
static DoubleStringParser |
getParser()
Returns a DoubleStringParser . |
Object |
parse(String arg)
Parses the specified argument into a Double. |
Methods inherited from class com.martiansoftware.jsap.StringParser |
---|
setUp, tearDown |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleStringParser()
getParser()
or, even better, JSAP.DOUBLE_PARSER
.
Method Detail |
---|
public static DoubleStringParser getParser()
DoubleStringParser
.
Convenient access to the only instance returned by
this method is available through
JSAP.DOUBLE_PARSER
.
DoubleStringParser
.public Object parse(String arg) throws ParseException
parse
in class StringParser
arg
- the argument to parse
ParseException
- if new Double(arg)
throws a
NumberFormatException.Double
,
StringParser.parse(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |