Class AttributeValueSetTypeRestriction
- java.lang.Object
-
- edu.kit.ipd.sdq.dataflow.systemmodel.typing.AttributeValueSetTypeRestriction
-
- All Implemented Interfaces:
AttributeRestriction
@Data public class AttributeValueSetTypeRestriction extends Object implements AttributeRestriction
Restriction that an unbound Attribute-Variable in an assignment rule must be of a certain ValueSetType.
-
-
Constructor Summary
Constructors Constructor Description AttributeValueSetTypeRestriction(ValueSetType requiredValueSetType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doesAttributeMatch(TranslationCache bb, Attribute attribute)
Checks whether the given Attribute fulfills the restrictions imposed by this instance.boolean
equals(Object obj)
String
getPredicateForRestriction(String attributeVariable)
Return a prolog goal which represents this exact restriction in Prolog code.ValueSetType
getRequiredValueSetType()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
AttributeValueSetTypeRestriction
public AttributeValueSetTypeRestriction(ValueSetType requiredValueSetType)
-
-
Method Detail
-
doesAttributeMatch
public boolean doesAttributeMatch(TranslationCache bb, Attribute attribute)
Description copied from interface:AttributeRestriction
Checks whether the given Attribute fulfills the restrictions imposed by this instance. The blackboard is used as cache.- Specified by:
doesAttributeMatch
in interfaceAttributeRestriction
- Parameters:
bb
- The TranslatioCache to use for speeding up reoccuring lookupsattribute
- The attribute to check for a match
-
getPredicateForRestriction
public String getPredicateForRestriction(String attributeVariable)
Description copied from interface:AttributeRestriction
Return a prolog goal which represents this exact restriction in Prolog code. For example given the attributeVariable 'A' and teh restriction that this attribute needs to have the type 'mytype', the return code would be 'attributeDataType(A,'mytype')'.- Specified by:
getPredicateForRestriction
in interfaceAttributeRestriction
- Parameters:
attributeVariable
- The Prolog variable which is used to match the restrictions
-
getRequiredValueSetType
@Pure public ValueSetType getRequiredValueSetType()
-
-