public class BooleanParser extends Object
| Constructor and Description |
|---|
BooleanParser(TruthValues mapping)
Creates a parser using the specified mapping.
|
BooleanParser(TruthValues mapping,
String nullIndicator)
Creates a parser using the specified mapping.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getParseError()
When
parse method returns false
this method can be used to retrieve the specific error
message detailing why the parsing failed. |
boolean |
parse(String text)
Parses the given text string into a token value.
|
protected void |
setParseError(String msg) |
void |
setTarget(ScalarSettable output)
Sets the buffer for holding parsed values.
|
public BooleanParser(TruthValues mapping)
mapping - the mapping of strings to boolean
valuespublic BooleanParser(TruthValues mapping, String nullIndicator)
mapping - the mapping of strings to boolean
valuesnullIndicator - the text value representing nullpublic final void setTarget(ScalarSettable output)
TokenParsersetTarget in interface TokenParseroutput - the value buffer in which to store parsed
valuespublic final boolean parse(String text)
TokenParsergetParseError method.parse in interface TokenParsertext - text string to convert. Callers should not
assume it is safe to pass null.true if the parsing succeeded,
false otherwise.protected final void setParseError(String msg)
public final String getParseError()
TokenParserparse method returns false
this method can be used to retrieve the specific error
message detailing why the parsing failed. If the last
parse was successful an empty string will be returnedgetParseError in interface TokenParserparse.Copyright © 2016 Actian Corporation. All rights reserved.