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