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