|
||||||||||
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.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:
StringParser
,
Boolean
Constructor Summary | |
BooleanStringParser()
Creates a new BooleanStringParser |
Method Summary | |
Object |
parse(String arg)
Converts the specified argument into a Boolean. When parsing, the following arguments are interpreted as TRUE: null "t" (case-insensitive) "true" (case-insensitive) "y" (case-insensitive) "yes" (case-insensitive) "1" The following arguments are interpreted as FALSE: "f" (case-insensitive) "false" (case-insensitive) "n" (case-insensitive) "no" (case-insensitive) "0" All other input throws a ParseException. |
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()
Method Detail |
public Object parse(String arg) throws 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 |