Class BooleanValue
java.lang.Object
net.ssehub.easy.varModel.model.values.Value
net.ssehub.easy.varModel.model.values.BasisDatatypeValue
net.ssehub.easy.varModel.model.values.BooleanValue
This class holds the value for the boolean.
- Author:
- lueder, Holger Eichelberger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BooleanValuestatic final BooleanValueprivate Boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedArgumentless constructor representing the type itself.protectedBooleanValue(Boolean value) Creates a boolean value from the given boolean value.protectedBooleanValue(String value) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IValueVisitor visitor) Abstract accept method.clone()Clones the this value.booleangetValue()Getter for the value.inthashCode()booleanAbstract Method to check whether a value is configured.voidAbstract setValue-method.static final BooleanValuetoBooleanValue(boolean value) Converts a Java boolean into an IVML boolean value.static final BooleanValuetoBooleanValue(String value) Converts a String ("true", "false") into an IVML boolean value.static final BooleanValuetoBooleanValueEx(String value) Converts a String ("true", "false") into an IVML boolean value.private static final BooleanConverts a String ("true", "false") into an IVML Boolean value.Methods inherited from class net.ssehub.easy.varModel.model.values.BasisDatatypeValue
equalsPartiallyMethods inherited from class net.ssehub.easy.varModel.model.values.Value
equals, equalsPartially, getContainedType, getType, getValueParent, setValueParent, stringValueOf, toString
-
Field Details
-
TRUE
-
FALSE
-
value
-
-
Constructor Details
-
BooleanValue
Constructor. Please avoid this constructor and use the constants instead.- Parameters:
value- Value of the Datatype- Throws:
ValueDoesNotMatchTypeException- if the given value does not match this type
-
BooleanValue
protected BooleanValue()Argumentless constructor representing the type itself. -
BooleanValue
Creates a boolean value from the given boolean value.- Parameters:
value- the value to assign
-
-
Method Details
-
getValue
Getter for the value.- Overrides:
getValuein classBasisDatatypeValue- Returns:
- the saved boolean
-
setValue
Description copied from class:ValueAbstract setValue-method.- Specified by:
setValuein classValue- Parameters:
value- the value to set.- Throws:
ValueDoesNotMatchTypeException- if the given value does not match this type
-
accept
Description copied from class:ValueAbstract accept method. -
isConfigured
public boolean isConfigured()Description copied from class:ValueAbstract Method to check whether a value is configured.- Specified by:
isConfiguredin classValue- Returns:
- true = it is configured / false = it is not
-
clone
Description copied from class:ValueClones the this value. -
toBooleanValue
Converts a Java boolean into an IVML boolean value. To some degree, this bypasses the value factory but - as the result is obvious, but also simplifies some (evaluation) code.- Parameters:
value- the value to be converted- Returns:
- the IVML value
-
toValue
Converts a String ("true", "false") into an IVML Boolean value.- Parameters:
value- the value to be converted- Returns:
- the IVML value (may be null if no match)
-
toBooleanValue
Converts a String ("true", "false") into an IVML boolean value. To some degree, this bypasses the value factory but - as the result is obvious, but also simplifies some (evaluation) code and may save resources.- Parameters:
value- the value to be converted- Returns:
- the IVML value (may be null if no match)
-
toBooleanValueEx
public static final BooleanValue toBooleanValueEx(String value) throws ValueDoesNotMatchTypeException Converts a String ("true", "false") into an IVML boolean value. To some degree, this bypasses the value factory but - as the result is obvious, but also simplifies some (evaluation) code and may save resources.- Parameters:
value- the value to be converted- Returns:
- the IVML value
- Throws:
ValueDoesNotMatchTypeException- in case that the value does not match
-
hashCode
public int hashCode() -
equals
-