Class MetaTypeValue
- java.lang.Object
-
- net.ssehub.easy.varModel.model.values.Value
-
- net.ssehub.easy.varModel.model.values.MetaTypeValue
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMetaTypeValue()Argumentless constructor.protectedMetaTypeValue(java.lang.Object value)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IValueVisitor visitor)Abstract accept method.Valueclone()Clones the this value.booleanequalsPartially(Value value)Returns whether the providedvalueis partially equal to this value, i.e., whether the nested elements ofvalue(if they exist) have the same contents as in this value.IDatatypegetContainedType()Returns the data type explicitly contained in this value.IDatatypegetValue()Getter for the value.booleanisConfigured()Abstract Method to check whether a value is configured.voidsetValue(java.lang.Object value)Abstract setValue-method.-
Methods inherited from class net.ssehub.easy.varModel.model.values.Value
equals, equals, equalsPartially, getType, getValueParent, hashCode, setValueParent, stringValueOf, toString
-
-
-
-
Field Detail
-
value
private IDatatype value
-
-
Constructor Detail
-
MetaTypeValue
protected MetaTypeValue(java.lang.Object value) throws ValueDoesNotMatchTypeExceptionConstructor.- Parameters:
value- Value of this instance- Throws:
ValueDoesNotMatchTypeException- if the given value does not match this type
-
MetaTypeValue
protected MetaTypeValue()
Argumentless constructor.
-
-
Method Detail
-
getValue
public IDatatype getValue()
Getter for the value.
-
setValue
public void setValue(java.lang.Object value) throws ValueDoesNotMatchTypeExceptionDescription 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
public void accept(IValueVisitor visitor)
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
-
getContainedType
public IDatatype getContainedType()
Returns the data type explicitly contained in this value. This is typically a meta value, i.e. a type expression.- Overrides:
getContainedTypein classValue- Returns:
- the contained type or null if there is none
-
equalsPartially
public boolean equalsPartially(Value value)
Description copied from class:ValueReturns whether the providedvalueis partially equal to this value, i.e., whether the nested elements ofvalue(if they exist) have the same contents as in this value. Other values of this value are not considered. The check is transitive on nested elements. Please consider that this method is not symmetric as opposed toequals. This method is important to cope with default values.- Specified by:
equalsPartiallyin classValue- Parameters:
value- the value to be checked for partial equality.- Returns:
trueifvalueis partially equal to this,falseelse
-
-