Class ConstraintValue
- java.lang.Object
-
- net.ssehub.easy.varModel.model.values.Value
-
- net.ssehub.easy.varModel.model.values.BasisDatatypeValue
-
- net.ssehub.easy.varModel.model.values.ConstraintValue
-
public class ConstraintValue extends BasisDatatypeValue
This class holds the value for a constraint type.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private ConstraintSyntaxTreevalue
-
Constructor Summary
Constructors Modifier Constructor Description protectedConstraintValue()Argumentless constructor.protectedConstraintValue(java.lang.Object value)Constructor.protectedConstraintValue(ConstraintSyntaxTree value)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IValueVisitor visitor)Accept method for the visitor.Valueclone()Clones the this value.booleanequals(java.lang.Object object)ConstraintSyntaxTreegetValue()Returns the stored value.inthashCode()booleanisConfigured()Abstract Method to check whether a value is configured.voidsetValue(java.lang.Object value)Setter for the value.java.lang.StringtoString()-
Methods inherited from class net.ssehub.easy.varModel.model.values.BasisDatatypeValue
equalsPartially
-
Methods inherited from class net.ssehub.easy.varModel.model.values.Value
equals, equalsPartially, getContainedType, getType, getValueParent, setValueParent, stringValueOf
-
-
-
-
Field Detail
-
value
private ConstraintSyntaxTree value
-
-
Constructor Detail
-
ConstraintValue
protected ConstraintValue()
Argumentless constructor.
-
ConstraintValue
protected ConstraintValue(java.lang.Object value) throws ValueDoesNotMatchTypeExceptionConstructor.- Parameters:
value- Value of the Datatype- Throws:
ValueDoesNotMatchTypeException- in case that the given value does not match the requirements of this class, i.e. cannot be converted
-
ConstraintValue
protected ConstraintValue(ConstraintSyntaxTree value)
Constructor.- Parameters:
value- Value of the Datatype
-
-
Method Detail
-
setValue
public void setValue(java.lang.Object value) throws ValueDoesNotMatchTypeExceptionSetter for the value.- Specified by:
setValuein classValue- Parameters:
value- Value of the Datatype- Throws:
ValueDoesNotMatchTypeException- if the given value does not match this type
-
getValue
public ConstraintSyntaxTree getValue()
Returns the stored value.- Overrides:
getValuein classBasisDatatypeValue- Returns:
- the stored constraint (may be null)
-
accept
public void accept(IValueVisitor visitor)
Accept method for the visitor.
This method is used for saving this model element.
-
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
-
-