Class AttributeDataTypeRestriction
- java.lang.Object
-
- edu.kit.ipd.sdq.dataflow.systemmodel.typing.AttributeDataTypeRestriction
-
- All Implemented Interfaces:
AttributeRestriction
@Data public class AttributeDataTypeRestriction extends Object implements AttributeRestriction
Restriction that an unbound Attribute-Variable in an assignment rule must be part of a DataType.
-
-
Constructor Summary
Constructors Constructor Description AttributeDataTypeRestriction(DataType requiredContainingDataType)
-
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.DataType
getRequiredContainingDataType()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
AttributeDataTypeRestriction
public AttributeDataTypeRestriction(DataType requiredContainingDataType)
-
-
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
-
getRequiredContainingDataType
@Pure public DataType getRequiredContainingDataType()
-
-