public class LongStringParser extends StringParser
StringParser for parsing Longs. The parse() method delegates the actual
parsing to Long.decode(String).StringParser,
Long| Constructor and Description |
|---|
LongStringParser()
Deprecated.
Use
getParser() or, even better, JSAP.LONG_PARSER. |
| Modifier and Type | Method and Description |
|---|---|
static LongStringParser |
getParser()
Returns a
LongStringParser. |
java.lang.Object |
parse(java.lang.String arg)
Parses the specified argument into a Long.
|
setUp, tearDownpublic LongStringParser()
getParser() or, even better, JSAP.LONG_PARSER.public static LongStringParser getParser()
LongStringParser.
Convenient access to the only instance returned by
this method is available through
JSAP.LONG_PARSER.
LongStringParser.public java.lang.Object parse(java.lang.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 parseParseException - if Long.decode(arg) throws a
NumberFormatException.Long,
StringParser.parse(String)Copyright © 2002-2006, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap