| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| public static final BooleanNode | |
| private static final long | |
| public static final BooleanNode |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | asBoolean()
Overrides com. |
| public boolean | asBoolean(boolean defaultValue)
Overrides com. |
| public double | asDouble(double defaultValue)
Method that will try to convert value of this node to a Java double.
|
| public int | asInt(int defaultValue)
Method that will try to convert value of this node to a Java int.
|
| public long | asLong(long defaultValue)
Method that will try to convert value of this node to a Java long.
|
| public String | asText()
Implements abstract com. isValueNode returns true),
otherwise empty String.
|
| public JsonToken | asToken()
Implements abstract com. Implements com. |
| public boolean | booleanValue()
Overrides com. |
| public boolean | equals(Object
the reference object with which to compare. o)Implements abstract com. |
| public static BooleanNode | |
| public JsonNodeType | getNodeType()
Implements abstract com. |
| public static BooleanNode | |
| public int | hashCode()
Implements abstract com. |
| protected Object | |
| public final void | serialize(JsonGenerator g, SerializerProvider provider)
Implements abstract com. Implements com. |
| public static BooleanNode |
| _value | back to summary |
|---|---|
| private final boolean _value | |
| FALSE | back to summary |
|---|---|
| public static final BooleanNode FALSE | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| TRUE | back to summary |
|---|---|
| public static final BooleanNode TRUE | |
| BooleanNode | back to summary |
|---|---|
| protected BooleanNode(boolean v) Note visibility raised to `protected` in 2.9.3 to allow custom subtypes. | |
| asBoolean | back to summary |
|---|---|
| public boolean asBoolean() Overrides com. Doc from com. Method that will try to convert value of this node to a Java boolean. JSON booleans map naturally; integer numbers other than 0 map to true, and 0 maps to false and Strings 'true' and 'false' map to corresponding values. If representation cannot be converted to a boolean value (including structured types like Objects and Arrays), default value of false will be returned; no exceptions are thrown.
| |
| asBoolean | back to summary |
|---|---|
| public boolean asBoolean(boolean defaultValue) Overrides com. Doc from com. Method that will try to convert value of this node to a Java boolean. JSON booleans map naturally; integer numbers other than 0 map to true, and 0 maps to false and Strings 'true' and 'false' map to corresponding values. If representation cannot be converted to a boolean value (including structured types like Objects and Arrays), specified defaultValue will be returned; no exceptions are thrown.
| |
| asDouble | back to summary |
|---|---|
| public 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 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 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 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
| |
| booleanValue | back to summary |
|---|---|
| public boolean booleanValue() Overrides com. Doc from com. Method to use for accessing JSON boolean values (value literals 'true' and 'false'). For other types, always returns false.
| |
| 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
| |
| getFalse | back to summary |
|---|---|
| public static BooleanNode getFalse() | |
| getNodeType | back to summary |
|---|---|
| public JsonNodeType getNodeType() Implements abstract com. Doc from com. Return the type of this node
| |
| getTrue | back to summary |
|---|---|
| public static BooleanNode getTrue() | |
| 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
| |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() | |
| 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.
| |
| valueOf | back to summary |
|---|---|
| public static BooleanNode valueOf(boolean b) | |