public class BooleanStringParser extends StringParser
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 and Description |
|---|
BooleanStringParser()
Deprecated.
Use
getParser() or, even better, JSAP.BOOLEAN_PARSER. |
| Modifier and Type | Method and Description |
|---|---|
static BooleanStringParser |
getParser()
Returns a
BooleanStringParser. |
Object |
parse(String arg)
Converts the specified argument into a Boolean.
|
setUp, tearDownpublic BooleanStringParser()
getParser() or, even better, JSAP.BOOLEAN_PARSER.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 StringParserarg - the argument to convert to a Boolean.ParseException - if none of the above cases are matched.Copyright © 2016. All rights reserved.