JSON
Version 1.0

org.codehaus.jackson.map.impl
Class BooleanNode

java.lang.Object
  extended by org.codehaus.jackson.map.JsonNode
      extended by org.codehaus.jackson.map.impl.ValueNode
          extended by org.codehaus.jackson.map.impl.BooleanNode

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


Method Summary
 boolean equals(Object o)
          Let's mark this standard method as abstract to ensure all implementation classes define it
 boolean getBooleanValue()
           
static BooleanNode getFalse()
           
static BooleanNode getTrue()
           
 String getValueAsText()
          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.
 boolean isBoolean()
           
static BooleanNode valueOf(boolean b)
           
 void writeTo(JsonGenerator jg)
          Method that can be called to serialize this node and all of its descendants using specified JSON generator.
 
Methods inherited from class org.codehaus.jackson.map.impl.ValueNode
getPath, getPath, isValueNode, toString
 
Methods inherited from class org.codehaus.jackson.map.JsonNode
appendElement, getDecimalValue, getDoubleValue, getElements, getElementValue, getFieldNames, getFieldValue, getFieldValues, getIntValue, getLongValue, getNumberValue, getTextValue, insertElement, isArray, isBigDecimal, isContainerNode, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isTextual, removeElement, removeElement, reportNoArrayMods, reportNoObjectMods, setElement, setElement, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getTrue

public static BooleanNode getTrue()

getFalse

public static BooleanNode getFalse()

valueOf

public static BooleanNode valueOf(boolean b)

isBoolean

public boolean isBoolean()
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

writeTo

public void writeTo(JsonGenerator jg)
             throws IOException,
                    JsonGenerationException
Description copied from class: JsonNode
Method that can be called to serialize this node and all of its descendants using specified JSON generator.

Specified by:
writeTo in class JsonNode
Throws:
IOException
JsonGenerationException

equals

public boolean equals(Object o)
Description copied from class: JsonNode
Let's mark this standard method as abstract to ensure all implementation classes define it

Specified by:
equals in class JsonNode

JSON
Version 1.0

Apache License, Version 2.0