Class JsonBoolean
java.lang.Object
name.martingeisse.grumpyjson.json_model.JsonElement
name.martingeisse.grumpyjson.json_model.JsonBoolean
This class represents the JSON values true and false.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonBooleanThe JSON false valuestatic final JsonBooleanThe JSON true value -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this JSON element is not a JSON boolean, this method throws aJsonDeserializationException, otherwise it returns the boolean value.booleanbooleangetValue()Getter method.inthashCode()static JsonBooleanof(boolean value) Returns an instance of this class for a plain boolean value.toString()Methods inherited from class name.martingeisse.grumpyjson.json_model.JsonElement
deserializerExpectsArray, deserializerExpectsNull, deserializerExpectsNumber, deserializerExpectsObject, deserializerExpectsString
-
Field Details
-
TRUE
The JSON true value -
FALSE
The JSON false value
-
-
Method Details
-
of
Returns an instance of this class for a plain boolean value.- Parameters:
value- the boolean value- Returns:
- the JSON boolean for that value
-
getValue
public boolean getValue()Getter method.- Returns:
- the value of this JSON boolean
-
deserializerExpectsBoolean
public boolean deserializerExpectsBoolean()Description copied from class:JsonElementIf this JSON element is not a JSON boolean, this method throws aJsonDeserializationException, otherwise it returns the boolean value.- Overrides:
deserializerExpectsBooleanin classJsonElement- Returns:
- the boolean value
-
equals
-
hashCode
public int hashCode() -
toString
-