|
||||||||||
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.BooleanStringParser
A StringParser
for parsing Booleans. This StringParser is also used
internally
by the Switch class.
When parsing, the following arguments are interpreted as TRUE:
The following arguments are interpreted as FALSE:
All other input throws a ParseException.
StringParser
,
Boolean
Constructor Summary | |
BooleanStringParser()
Deprecated. Use getParser() or, even better, JSAP.BOOLEAN_PARSER . |
Method Summary | |
static BooleanStringParser |
getParser()
Returns a BooleanStringParser . |
Object |
parse(String arg)
Converts the specified argument into a Boolean. |
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 BooleanStringParser()
getParser()
or, even better, JSAP.BOOLEAN_PARSER
.
Method Detail |
public static BooleanStringParser getParser()
BooleanStringParser
.
Convenient access to the only instance returned by
this method is available through
JSAP.BOOLEAN_PARSER
.
BooleanStringParser
.public Object parse(String arg) throws ParseException
When parsing, the following arguments are interpreted as TRUE:
The following arguments are interpreted as FALSE:
All other input throws a ParseException.
parse
in class StringParser
arg
- the argument to convert to a Boolean.
ParseException
- if none of the above cases are matched.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |