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 . |
java.lang.Object |
parse(java.lang.String arg)
Parses the specified argument into a Character.
|
setUp, tearDown
public CharacterStringParser()
public static CharacterStringParser getParser()
CharacterStringParser
.
Convenient access to the only instance returned by
this method is available through
JSAP.CHARACTER_PARSER
.
CharacterStringParser
.public java.lang.Object parse(java.lang.String arg) throws ParseException
parse
in class StringParser
arg
- the argument to parseParseException
- if ( (arg==null) || (arg.length()!=1) )Character
,
StringParser.parse(String)
Copyright © 2002-2006, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap