JSON
Version 1.0

org.codehaus.jackson.map.impl
Class DoubleNode

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.NumericNode
              extended by org.codehaus.jackson.map.impl.DoubleNode

public final class DoubleNode
extends NumericNode

Numeric node that contains 64-bit ("double precision") floating point values simple 32-bit integer values.


Constructor Summary
DoubleNode(double v)
           
 
Method Summary
 boolean equals(Object o)
          Let's mark this standard method as abstract to ensure all implementation classes define it
 BigDecimal getDecimalValue()
           
 double getDoubleValue()
           
 int getIntValue()
           
 long getLongValue()
           
 Number getNumberValue()
           
 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 isDouble()
           
 boolean isFloatingPointNumber()
           
static DoubleNode valueOf(double v)
           
 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.NumericNode
isNumber
 
Methods inherited from class org.codehaus.jackson.map.impl.ValueNode
getPath, getPath, isValueNode, toString
 
Methods inherited from class org.codehaus.jackson.map.JsonNode
appendElement, getBooleanValue, getElements, getElementValue, getFieldNames, getFieldValue, getFieldValues, getTextValue, insertElement, isArray, isBigDecimal, isBoolean, isContainerNode, isInt, isIntegralNumber, isLong, isMissingNode, isNull, 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
 

Constructor Detail

DoubleNode

public DoubleNode(double v)
Method Detail

valueOf

public static DoubleNode valueOf(double v)

isFloatingPointNumber

public boolean isFloatingPointNumber()
Overrides:
isFloatingPointNumber in class JsonNode

isDouble

public boolean isDouble()
Overrides:
isDouble in class JsonNode

getNumberValue

public Number getNumberValue()
Specified by:
getNumberValue in class NumericNode

getIntValue

public int getIntValue()
Specified by:
getIntValue in class NumericNode

getLongValue

public long getLongValue()
Specified by:
getLongValue in class NumericNode

getDoubleValue

public double getDoubleValue()
Specified by:
getDoubleValue in class NumericNode

getDecimalValue

public BigDecimal getDecimalValue()
Specified by:
getDecimalValue in class NumericNode

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 NumericNode

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