Package de.monticore.values
Class MCValueBoolean
java.lang.Object
de.monticore.values.MCValueBoolean
- All Implemented Interfaces:
MCValue
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanUsed to pass the value to native Java classes and similar, e.g., collections.asString()booleancheckEqualityOperator(MCValue other) basically implements==booleanbooleanPrint the type of the MIValue in human-readable formPrint the value in human-readable form
-
Field Details
-
value
protected boolean value
-
-
Constructor Details
-
MCValueBoolean
public MCValueBoolean(boolean value)
-
-
Method Details
-
isBoolean
public boolean isBoolean() -
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceMCValue
-
asBoolean
public boolean asBoolean() -
asNativeObject
Description copied from interface:MCValueUsed to pass the value to native Java classes and similar, e.g., collections.Note: not all values can have a native representation, as such, their native version is the MIValue itself.
- Specified by:
asNativeObjectin interfaceMCValue- Returns:
- The value as a Java native Object.
-
asString
-
checkEqualityOperator
Description copied from interface:MCValuebasically implements==- Specified by:
checkEqualityOperatorin interfaceMCValue- Parameters:
other- the value to check against this- Returns:
- whether they are considered equal
-
printType
Description copied from interface:MCValuePrint the type of the MIValue in human-readable form -
printValue
Description copied from interface:MCValuePrint the value in human-readable form- Specified by:
printValuein interfaceMCValue
-