|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.martiansoftware.jsap.StringParser com.martiansoftware.jsap.stringparsers.FloatStringParser
A StringParser
for parsing Floats. The parse()
method delegates
the actual
parsing to new Float(String)
. If new Float(String)
throws a NumberFormatException, it
is encapsulated in a ParseException and re-thrown.
StringParser
,
Float
Constructor Summary | |
FloatStringParser()
Deprecated. Use getParser() or, even better, JSAP.FLOAT_PARSER . |
Method Summary | |
static FloatStringParser |
getParser()
Returns a FloatStringParser . |
Object |
parse(String arg)
Parses the specified argument into a Float. |
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 FloatStringParser()
getParser()
or, even better, JSAP.FLOAT_PARSER
.
Method Detail |
public static FloatStringParser getParser()
FloatStringParser
.
Convenient access to the only instance returned by
this method is available through
JSAP.FLOAT_PARSER
.
FloatStringParser
.public Object parse(String arg) throws ParseException
parse
in class StringParser
arg
- the argument to parse
ParseException
- if new Float(arg)
throws a
NumberFormatException.Float
,
StringParser.parse(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |