Class JsonBoolean
java.lang.Object
de.monticore.symboltable.serialization.json.JsonBoolean
- All Implemented Interfaces:
JsonElement
Represents a Json Boolean. It can be true or - you probably guessed this - false.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJsonBoolean(boolean value) Constructor for de.monticore._symboltable.serialization.json.JsonBoolean -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.monticore.symboltable.serialization.json.JsonElement
getAsJsonArray, getAsJsonNull, getAsJsonNumber, getAsJsonObject, getAsJsonString, isJsonArray, isJsonNull, isJsonNumber, isJsonObject, isJsonString
-
Field Details
-
value
protected boolean value
-
-
Constructor Details
-
JsonBoolean
public JsonBoolean(boolean value) Constructor for de.monticore._symboltable.serialization.json.JsonBoolean- Parameters:
value-
-
-
Method Details
-
isJsonBoolean
public boolean isJsonBoolean()- Specified by:
isJsonBooleanin interfaceJsonElement- Returns:
- true iff this object is of type JsonBoolean and false otherwise.
- See Also:
-
getAsJsonBoolean
- Specified by:
getAsJsonBooleanin interfaceJsonElement- Returns:
- this object as JsonBoolean if it is of this type and throws an error otherwise.
- See Also:
-
getValue
public boolean getValue()- Returns:
- value
-
setValue
public void setValue(boolean value) - Parameters:
value- the value to set
-
toString
-
print
- Specified by:
printin interfaceJsonElement
-