public class JsonBoolean extends JsonElement
Represents a JSON boolean element.
Modifier and Type | Field and Description |
---|---|
static JsonBoolean |
FALSE |
static JsonBoolean |
TRUE |
TYPE_ARRAY, TYPE_BOOLEAN, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING
Modifier and Type | Method and Description |
---|---|
int |
getType()
Return JsonElement.TYPE_BOOLEAN.
|
boolean |
getValue()
Return value of this element.
|
static JsonBoolean |
of(boolean value)
Return a boolean element with the specified
value . |
java.lang.String |
toString()
Return the boolean
JsonBoolean.value in JSON format. |
applyVersion, format, parse, parseArray, parseObject, parseOptimized
public static final JsonBoolean FALSE
public static final JsonBoolean TRUE
public int getType()
Return JsonElement.TYPE_BOOLEAN.
getType
in class JsonElement
public boolean getValue()
Return value of this element.
public static JsonBoolean of(boolean value)
Return a boolean element with the specified value
.
value
- Boolean value.value
.public java.lang.String toString()
Return the boolean JsonBoolean.value
in JSON format.
toString
in class JsonElement
JsonBoolean.value
in JSON format.