public class JSONBooleanValue extends JSONValue
| Modifier and Type | Field and Description |
|---|---|
static JSONBooleanValue |
FALSE
singleton instance representing false.
|
static JSONBooleanValue |
TRUE
singleton instance representing true.
|
| Modifier and Type | Method and Description |
|---|---|
static JSONBooleanValue |
fromLiteral(java.lang.String literal)
Factory method to create a
JSONBooleanValue from a given JSON literal. |
static JSONBooleanValue |
fromValue(boolean value)
Factory method to create a
JSONBooleanValue from a given boolean value. |
boolean |
getValue()
Get value represented by this instance.
|
boolean |
isBoolean()
Get a boolean indicating whether this instance represents a JSON boolean value or not.
|
public static final JSONBooleanValue TRUE
public static final JSONBooleanValue FALSE
public static JSONBooleanValue fromValue(boolean value)
JSONBooleanValue from a given boolean value.
The return value is one of the two singleton instances TRUE or FALSE, depending on value.
public static JSONBooleanValue fromLiteral(java.lang.String literal)
JSONBooleanValue from a given JSON literal.literal - The string literal for which to create the value.TRUE if literal is JSONLiterals.BOOLEAN_TRUE_LITERAL, FALSE if literal
is JSONLiterals.BOOLEAN_FALSE_LITERAL and null in every other case.public boolean isBoolean()
JSONValuepublic boolean getValue()