org.codehaus.jackson.node
Class NumericNode

java.lang.Object
  extended by org.codehaus.jackson.JsonNode
      extended by org.codehaus.jackson.node.BaseJsonNode
          extended by org.codehaus.jackson.node.ValueNode
              extended by org.codehaus.jackson.node.NumericNode
All Implemented Interfaces:
java.lang.Iterable<JsonNode>, JsonSerializable
Direct Known Subclasses:
BigIntegerNode, DecimalNode, DoubleNode, IntNode, LongNode

public abstract class NumericNode
extends ValueNode

Intermediate value node used for numeric nodes.


Constructor Summary
protected NumericNode()
           
 
Method Summary
abstract  java.math.BigInteger getBigIntegerValue()
           
abstract  java.math.BigDecimal getDecimalValue()
           
abstract  double getDoubleValue()
           
abstract  int getIntValue()
           
abstract  long getLongValue()
           
abstract  java.lang.Number getNumberValue()
           
abstract  java.lang.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 isNumber()
           
 
Methods inherited from class org.codehaus.jackson.node.ValueNode
isValueNode, path, path, toString
 
Methods inherited from class org.codehaus.jackson.node.BaseJsonNode
serialize, writeTo
 
Methods inherited from class org.codehaus.jackson.JsonNode
equals, get, get, getBinaryValue, getBooleanValue, getElements, getElementValue, getFieldNames, getFieldValue, getPath, getPath, getTextValue, isArray, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isObject, isPojo, isTextual, iterator, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumericNode

protected NumericNode()
Method Detail

isNumber

public final boolean isNumber()
Overrides:
isNumber in class JsonNode
Returns:
True if this node represents a numeric Json value

getNumberValue

public abstract java.lang.Number getNumberValue()
Overrides:
getNumberValue in class JsonNode

getIntValue

public abstract int getIntValue()
Overrides:
getIntValue in class JsonNode

getLongValue

public abstract long getLongValue()
Overrides:
getLongValue in class JsonNode

getDoubleValue

public abstract double getDoubleValue()
Overrides:
getDoubleValue in class JsonNode

getDecimalValue

public abstract java.math.BigDecimal getDecimalValue()
Overrides:
getDecimalValue in class JsonNode

getBigIntegerValue

public abstract java.math.BigInteger getBigIntegerValue()
Overrides:
getBigIntegerValue in class JsonNode

getValueAsText

public abstract java.lang.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