public class CharacterStringParser extends StringParser
StringParser for parsing Characters. The parse() method requires an
argument of length exactly
equal to 1 in order to perform the conversion; otherwise, a ParseException
is thrown.StringParser,
Character| Constructor and Description |
|---|
CharacterStringParser()
Deprecated.
Use
getParser() or, even better, JSAP.CHARACTER_PARSER. |
| Modifier and Type | Method and Description |
|---|---|
static CharacterStringParser |
getParser()
Returns a
CharacterStringParser. |
Object |
parse(String arg)
Parses the specified argument into a Character.
|
setUp, tearDownpublic CharacterStringParser()
getParser() or, even better, JSAP.CHARACTER_PARSER.public static CharacterStringParser getParser()
CharacterStringParser.
Convenient access to the only instance returned by
this method is available through
JSAP.CHARACTER_PARSER.
CharacterStringParser.public Object parse(String arg) throws ParseException
parse in class StringParserarg - the argument to parseParseException - if ( (arg==null) || (arg.length()!=1) )Character,
StringParser.parse(String)Copyright © 2016. All rights reserved.