public final class JsonBoolean extends Object implements JsonValue
true or false in JSON.JsonValue.EntityType| Modifier and Type | Field and Description |
|---|---|
static JsonBoolean |
FALSE
The singleton instance that represents
false in JSON. |
static JsonBoolean |
TRUE
The singleton instance that represents
true in JSON. |
| Modifier and Type | Method and Description |
|---|---|
JsonBoolean |
asJsonBoolean()
Returns this value as
JsonBoolean. |
boolean |
booleanValue()
Returns this JSON
true or false as a primitive boolean. |
boolean |
equals(Object otherObject)
Compares the specified object with this JSON
true or false for equality. |
JsonValue.EntityType |
getEntityType()
Returns
JsonValue.EntityType.BOOLEAN, which is the entity type of JsonBoolean. |
int |
hashCode()
Returns the hash code value for this JSON
true or false. |
static JsonBoolean |
of(boolean value)
|
int |
presumeReferenceSizeInBytes()
|
String |
toJson()
Returns the stringified JSON representation of this JSON
true or false. |
Value |
toMsgpack()
Deprecated.
Do not use this method. It is to be removed at some point after Embulk v1.0.0.
It is here only to ensure a migration period from MessagePack-based JSON values to new
JSON values of
JsonValue. |
String |
toString()
Returns the string representation of this JSON
true or false. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasJsonArray, asJsonDouble, asJsonLong, asJsonNull, asJsonObject, asJsonString, fromMsgpack, isJsonArray, isJsonBoolean, isJsonDouble, isJsonLong, isJsonNull, isJsonObject, isJsonStringpublic static final JsonBoolean FALSE
false in JSON.public static final JsonBoolean TRUE
true in JSON.public static JsonBoolean of(boolean value)
public JsonValue.EntityType getEntityType()
JsonValue.EntityType.BOOLEAN, which is the entity type of JsonBoolean.getEntityType in interface JsonValueJsonValue.EntityType.BOOLEAN, which is the entity type of JsonBooleanpublic JsonBoolean asJsonBoolean()
JsonBoolean.asJsonBoolean in interface JsonValueJsonBooleanpublic int presumeReferenceSizeInBytes()
1 for the size of byte in bytes presumed to occupy in Page as a reference.
This approximate size is used only as a threshold whether PageBuilder is flushed, or not.
It is not accurate, it does not need to be accurate, and it is impossible in general to tell an accurate size that
a Java object occupies in the Java heap. But, a reasonable approximate would help to keep Page
performant in the Java heap.
It is better to flush more frequently for bigger JSON value objects, less often for smaller JSON value objects, but no infinite accumulation even for empty JSON value objects.
presumeReferenceSizeInBytes in interface JsonValue1public boolean booleanValue()
true or false as a primitive boolean.boolean representation of this JSON true or falsepublic String toJson()
true or false.@Deprecated public Value toMsgpack()
JsonValue.true or false.toMsgpack in interface JsonValuetrue or falsepublic String toString()
true or false.public boolean equals(Object otherObject)
true or false for equality.