org.codehaus.jackson.node
Class BooleanNode
java.lang.Object
org.codehaus.jackson.JsonNode
org.codehaus.jackson.node.BaseJsonNode
org.codehaus.jackson.node.ValueNode
org.codehaus.jackson.node.BooleanNode
- All Implemented Interfaces:
- Iterable<JsonNode>, JsonSerializable
public final class BooleanNode
- extends ValueNode
This concrete value class is used to contain boolean (true / false)
values. Only two instances are ever created, to minimize memory
usage
| Methods inherited from class org.codehaus.jackson.JsonNode |
get, get, getBigIntegerValue, getBinaryValue, getDecimalValue, getDoubleValue, getElements, getElementValue, getFieldNames, getFieldValue, getIntValue, getLongValue, getNumberValue, getPath, getPath, getTextValue, isArray, isBigDecimal, isBigInteger, isBinary, isContainerNode, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isPojo, isTextual, iterator, size |
TRUE
public static final BooleanNode TRUE
FALSE
public static final BooleanNode FALSE
getTrue
public static BooleanNode getTrue()
getFalse
public static BooleanNode getFalse()
valueOf
public static BooleanNode valueOf(boolean b)
isBoolean
public boolean isBoolean()
- Description copied from class:
JsonNode
- Method that can be used to check if this node was created from
Json boolean value (literals "true" and "false").
- Overrides:
isBoolean in class JsonNode
getBooleanValue
public boolean getBooleanValue()
- Overrides:
getBooleanValue in class JsonNode
getValueAsText
public String getValueAsText()
- Description copied from class:
JsonNode
- Method that will return valid String representation of
the container value, if the node is a value node
(method
JsonNode.isValueNode() returns true), otherwise null.
Note: to serialize nodes of any type, you should call
JsonNode.toString() instead.
- Specified by:
getValueAsText in class JsonNode
serialize
public final void serialize(JsonGenerator jg,
SerializerProvider provider)
throws IOException,
JsonProcessingException
- Specified by:
serialize in interface JsonSerializable- Specified by:
serialize in class BaseJsonNode
- Throws:
IOException
JsonProcessingException
equals
public boolean equals(Object o)
- Description copied from class:
JsonNode
Note: marked as abstract to ensure all implementation
classes define it properly.
- Specified by:
equals in class JsonNode