JsonNode implementation for efficiently containing 32-bit
`float` values.
| Modifier and Type | Field and Description |
|---|---|
| protected final float |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | asText()
Implements abstract com. isValueNode returns true),
otherwise empty String.
|
| public JsonToken | asToken()
Implements abstract com. Implements com. |
| public BigInteger | bigIntegerValue()
Implements abstract com. BigInteger), if and only if
this node is numeric (isNumber returns true).
|
| public boolean | canConvertToExactIntegral()
Overrides com. isNumber()) and
can be losslessly converted to integral number (specifically,
BigInteger but potentially others, see
canConvertToInt and canConvertToInt).
|
| public boolean | canConvertToInt()
Implements abstract com. isNumber would return true) AND its value fits
within Java's 32-bit signed integer type, int.
|
| public boolean | canConvertToLong()
Implements abstract com. isNumber would return true) AND its value fits
within Java's 64-bit signed integer type, long.
|
| public BigDecimal | decimalValue()
Implements abstract com. BigDecimal), if and only if
this node is numeric (isNumber returns true).
|
| public double | doubleValue()
Implements abstract com. isNumber returns true).
|
| public boolean | equals(Object
the reference object with which to compare. o)Implements abstract com. |
| public float | floatValue()
Overrides com. isNumber returns true).
|
| public int | hashCode()
Implements abstract com. |
| public int | intValue()
Implements abstract com. isNumber returns true).
|
| public boolean | |
| public boolean | |
| public boolean | isNaN()
Overrides com. FloatNode or DoubleNode that contains
"not-a-number" (NaN) value.
|
| public long | longValue()
Implements abstract com. isNumber returns true).
|
| public JsonParser. | numberType()
Implements abstract com. Implements com. |
| public Number | numberValue()
Implements abstract com. isNumber returns true); otherwise
returns null
|
| public final void | serialize(JsonGenerator g, SerializerProvider provider)
Implements abstract com. Implements com. |
| public short | shortValue()
Overrides com. isNumber returns true).
|
| public static FloatNode |
| _value | back to summary |
|---|---|
| protected final float _value | |
| FloatNode | back to summary |
|---|---|
| public FloatNode(float v) | |
| asText | back to summary |
|---|---|
| public 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
| |
| asToken | back to summary |
|---|---|
| public JsonToken asToken() Implements abstract com. Implements com. Doc from com. Method that can be used for efficient type detection
when using stream abstraction for traversing nodes.
Will return the first
| |
| bigIntegerValue | back to summary |
|---|---|
| public BigInteger bigIntegerValue() Implements abstract com. Doc from com. Returns integer value for this node (as Note In Jackson 2.x MAY throw
| |
| canConvertToExactIntegral | back to summary |
|---|---|
| public boolean canConvertToExactIntegral() Overrides com. Doc from com. Method that can be used to check whether contained value
is numeric (returns true for
| |
| canConvertToInt | back to summary |
|---|---|
| public boolean canConvertToInt() Implements abstract 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 boolean canConvertToLong() Implements abstract 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 BigDecimal decimalValue() Implements abstract com. Doc from com. Returns floating point value for this node (as
| |
| doubleValue | back to summary |
|---|---|
| public double doubleValue() Implements abstract com. Doc from com. Returns 64-bit floating point (double) value for this node, if and only if
this node is numeric (
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Implements abstract com. Doc from com. Equality for node objects is defined as full (deep) value equality. This means that it is possible to compare complete JSON trees for equality by comparing equality of root nodes. Note marked as abstract to ensure all implementation
classes define it properly and not rely on definition
from
| |
| floatValue | back to summary |
|---|---|
| public float floatValue() Overrides com. Doc from com. Returns 32-bit floating value for this node, if and only if
this node is numeric (
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract com. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| intValue | back to summary |
|---|---|
| public int intValue() Implements abstract com. Doc from com. Returns integer value for this node, if and only if
this node is numeric (
| |
| isFloat | back to summary |
|---|---|
| public boolean isFloat() Overrides com.
| |
| isFloatingPointNumber | back to summary |
|---|---|
| public boolean isFloatingPointNumber() Overrides com.
| |
| isNaN | back to summary |
|---|---|
| public boolean isNaN() Overrides com. Doc from com. Convenience method for checking whether this node is a
| |
| longValue | back to summary |
|---|---|
| public long longValue() Implements abstract 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 JsonParser. Implements abstract com. Implements 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 Number numberValue() Implements abstract com. Doc from com. Returns numeric value for this node, if and only if
this node is numeric ( | |
| serialize | back to summary |
|---|---|
| public final void serialize(JsonGenerator g, SerializerProvider provider) throws IOException Implements abstract com. Implements com. Doc from com. Method called to serialize node instances using given generator.
| |
| shortValue | back to summary |
|---|---|
| public short shortValue() Overrides com. Doc from com. Returns 16-bit short value for this node, if and only if
this node is numeric (
| |
| valueOf | back to summary |
|---|---|
| public static FloatNode valueOf(float v) | |