org.codehaus.jackson.node
Class LongNode

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
                  extended by org.codehaus.jackson.node.LongNode
All Implemented Interfaces:
Iterable<JsonNode>, JsonSerializable

public final class LongNode
extends NumericNode

Numeric node that contains simple 64-bit integer values.


Constructor Summary
LongNode(long v)
           
 
Method Summary
 boolean equals(Object o)
           Note: marked as abstract to ensure all implementation classes define it properly.
 BigInteger getBigIntegerValue()
           
 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.
 int hashCode()
           
 boolean isIntegralNumber()
           
 boolean isLong()
           
 void serialize(JsonGenerator jg, SerializerProvider provider)
           
static LongNode valueOf(long l)
           
 
Methods inherited from class org.codehaus.jackson.node.NumericNode
isNumber
 
Methods inherited from class org.codehaus.jackson.node.ValueNode
isValueNode, path, path, toString
 
Methods inherited from class org.codehaus.jackson.node.BaseJsonNode
writeTo
 
Methods inherited from class org.codehaus.jackson.JsonNode
get, get, getBinaryValue, getBooleanValue, getElements, getElementValue, getFieldNames, getFieldValue, getPath, getPath, getTextValue, isArray, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloatingPointNumber, isInt, isMissingNode, isNull, isObject, isPojo, isTextual, iterator, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongNode

public LongNode(long v)
Method Detail

valueOf

public static LongNode valueOf(long l)

isIntegralNumber

public boolean isIntegralNumber()
Overrides:
isIntegralNumber in class JsonNode
Returns:
True if this node represents an integral (integer) numeric Json value

isLong

public boolean isLong()
Overrides:
isLong in class JsonNode
Returns:
True if this node represents an integral numeric Json value that fits in Java long value space (but not int value space, i.e. JsonNode.isInt() returns false)

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

getBigIntegerValue

public BigInteger getBigIntegerValue()
Specified by:
getBigIntegerValue 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

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object