| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final double | asDouble()
Method that will try to convert value of this node to a Java double.
|
| public final double | asDouble(double defaultValue)
Method that will try to convert value of this node to a Java double.
|
| public final int | asInt()
Method that will try to convert value of this node to a Java int.
|
| public final int | asInt(int defaultValue)
Method that will try to convert value of this node to a Java int.
|
| public final long | asLong()
Method that will try to convert value of this node to a Java long.
|
| public final long | asLong(long defaultValue)
Method that will try to convert value of this node to a Java long.
|
| public abstract String | asText()
Implements abstract com. isValueNode returns true),
otherwise empty String.
|
| public abstract BigInteger | bigIntegerValue()
Overrides com. BigInteger), if and only if
this node is numeric (isNumber returns true).
|
| public abstract boolean | canConvertToInt()
Overrides com. isNumber would return true) AND its value fits
within Java's 32-bit signed integer type, int.
|
| public abstract boolean | canConvertToLong()
Overrides com. isNumber would return true) AND its value fits
within Java's 64-bit signed integer type, long.
|
| public abstract BigDecimal | decimalValue()
Overrides com. BigDecimal), if and only if
this node is numeric (isNumber returns true).
|
| public abstract double | doubleValue()
Overrides com. isNumber returns true).
|
| public final JsonNodeType | getNodeType()
Implements abstract com. |
| public abstract int | intValue()
Overrides com. isNumber returns true).
|
| public boolean | isNaN()
Convenience method for checking whether this node is a
|
| public abstract long | longValue()
Overrides com. isNumber returns true).
|
| public abstract JsonParser. | numberType()
Redeclares com. Overrides com. |
| public abstract Number | numberValue()
Overrides com. isNumber returns true); otherwise
returns null
|
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| NumericNode | back to summary |
|---|---|
| protected NumericNode() | |
| asDouble | back to summary |
|---|---|
| public final double asDouble() Overrides com. Doc from com. Method that will try to convert value of this node to a Java double. Numbers are coerced using default Java rules; booleans convert to 0.0 (false) and 1.0 (true), and Strings are parsed using default Java language integer parsing rules. If representation cannot be converted to an int (including structured types like Objects and Arrays), default value of 0.0 will be returned; no exceptions are thrown.
| |
| asDouble | back to summary |
|---|---|
| public final double asDouble(double defaultValue) Overrides com. Doc from com. Method that will try to convert value of this node to a Java double. Numbers are coerced using default Java rules; booleans convert to 0.0 (false) and 1.0 (true), and Strings are parsed using default Java language integer parsing rules. If representation cannot be converted to an int (including structured types like Objects and Arrays), specified defaultValue will be returned; no exceptions are thrown.
| |
| asInt | back to summary |
|---|---|
| public final int asInt() Overrides com. Doc from com. Method that will try to convert value of this node to a Java int. Numbers are coerced using default Java rules; booleans convert to 0 (false) and 1 (true), and Strings are parsed using default Java language integer parsing rules. If representation cannot be converted to an int (including structured types like Objects and Arrays), default value of 0 will be returned; no exceptions are thrown.
| |
| asInt | back to summary |
|---|---|
| public final int asInt(int defaultValue) Overrides com. Doc from com. Method that will try to convert value of this node to a Java int. Numbers are coerced using default Java rules; booleans convert to 0 (false) and 1 (true), and Strings are parsed using default Java language integer parsing rules. If representation cannot be converted to an int (including structured types like Objects and Arrays), specified defaultValue will be returned; no exceptions are thrown.
| |
| asLong | back to summary |
|---|---|
| public final long asLong() Overrides com. Doc from com. Method that will try to convert value of this node to a Java long. Numbers are coerced using default Java rules; booleans convert to 0 (false) and 1 (true), and Strings are parsed using default Java language integer parsing rules. If representation cannot be converted to a long (including structured types like Objects and Arrays), default value of 0 will be returned; no exceptions are thrown.
| |
| asLong | back to summary |
|---|---|
| public final long asLong(long defaultValue) Overrides com. Doc from com. Method that will try to convert value of this node to a Java long. Numbers are coerced using default Java rules; booleans convert to 0 (false) and 1 (true), and Strings are parsed using default Java language integer parsing rules. If representation cannot be converted to a long (including structured types like Objects and Arrays), specified defaultValue will be returned; no exceptions are thrown.
| |
| asText | back to summary |
|---|---|
| public abstract String asText() Implements abstract com. Doc from com. Method that will return a valid String representation of
the container value, if the node is a value node
(method
| |
| bigIntegerValue | back to summary |
|---|---|
| public abstract BigInteger bigIntegerValue() Overrides com. Doc from com. Returns integer value for this node (as Note In Jackson 2.x MAY throw
| |
| canConvertToInt | back to summary |
|---|---|
| public abstract boolean canConvertToInt() Overrides com. Doc from com. Method that can be used to check whether this node is a numeric
node ( Note this method does not consider possible value type conversion
from JSON String into Number; so even if this method returns false,
it is possible that
| |
| canConvertToLong | back to summary |
|---|---|
| public abstract boolean canConvertToLong() Overrides com. Doc from com. Method that can be used to check whether this node is a numeric
node ( Note this method does not consider possible value type conversion
from JSON String into Number; so even if this method returns false,
it is possible that
| |
| decimalValue | back to summary |
|---|---|
| public abstract BigDecimal decimalValue() Overrides com. Doc from com. Returns floating point value for this node (as
| |
| doubleValue | back to summary |
|---|---|
| public abstract double doubleValue() Overrides com. Doc from com. Returns 64-bit floating point (double) value for this node, if and only if
this node is numeric (
| |
| getNodeType | back to summary |
|---|---|
| public final JsonNodeType getNodeType() Implements abstract com. Doc from com. Return the type of this node
| |
| intValue | back to summary |
|---|---|
| public abstract int intValue() Overrides com. Doc from com. Returns integer value for this node, if and only if
this node is numeric (
| |
| isNaN | back to summary |
|---|---|
| public boolean isNaN() Convenience method for checking whether this node is a
| |
| longValue | back to summary |
|---|---|
| public abstract long longValue() Overrides com. Doc from com. Returns 64-bit long value for this node, if and only if
this node is numeric (
| |
| numberType | back to summary |
|---|---|
| public abstract JsonParser. Redeclares com. Overrides com. Doc from com. Returns code that identifies type of underlying numeric value, if (and only if) node is a number node.
| |
| numberValue | back to summary |
|---|---|
| public abstract Number numberValue() Overrides com. Doc from com. Returns numeric value for this node, if and only if
this node is numeric ( | |