|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.data.parser.BooleanParser
public class BooleanParser
DataParser instance that parses boolean values. The string "true" is parsed to true values, "false" to false values. Both are case insensitive.
Field Summary | |
---|---|
static java.lang.String |
FALSE
Text string indicating a "false" value. |
static java.lang.String |
TRUE
Text string indicating a "true" value. |
Constructor Summary | |
---|---|
BooleanParser()
|
Method Summary | |
---|---|
boolean |
canParse(java.lang.String text)
Indicates if the given text string can be successfully parsed by this parser. |
java.lang.String |
format(java.lang.Object value)
Get a String representation for the given value. |
java.lang.Class |
getType()
Returns boolean.class. |
java.lang.Object |
parse(java.lang.String text)
Parse the given text string to a data value. |
boolean |
parseBoolean(java.lang.String text)
Parse a boolean value from a text string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TRUE
public static final java.lang.String FALSE
Constructor Detail |
---|
public BooleanParser()
Method Detail |
---|
public java.lang.Class getType()
getType
in interface DataParser
DataParser.getType()
public java.lang.String format(java.lang.Object value)
DataParser
format
in interface DataParser
value
- the object value to format
DataParser.format(java.lang.Object)
public boolean canParse(java.lang.String text)
DataParser
canParse
in interface DataParser
text
- the text string to check for parsability
DataParser.canParse(java.lang.String)
public java.lang.Object parse(java.lang.String text) throws DataParseException
DataParser
parse
in interface DataParser
text
- the text string to parse
DataParser.getType()
method
DataParseException
- if an error occurs during parsingDataParser.parse(java.lang.String)
public boolean parseBoolean(java.lang.String text) throws DataParseException
text
- the text string to parse
DataParseException
- if an error occurs during parsing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |