Class TypedConstraint
- java.lang.Object
-
- net.ssehub.easy.varModel.model.ModelElement
-
- net.ssehub.easy.varModel.model.ContainableModelElement
-
- net.ssehub.easy.varModel.model.Constraint
-
- net.ssehub.easy.reasoning.core.reasoner.TypedConstraint
-
- All Implemented Interfaces:
IDatatypeVisitable,IModelElement,IPartialEvaluable
public class TypedConstraint extends Constraint
Reasoner specific constraint type indicating a typed constraint, e.g., a default constraint or a constraint originating from a constraint variable.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.ssehub.easy.varModel.model.Constraint
Constraint.IConstraintType, Constraint.Type
-
-
Field Summary
Fields Modifier and Type Field Description private Constraint.IConstraintTypetype
-
Constructor Summary
Constructors Constructor Description TypedConstraint(ConstraintSyntaxTree consSyntax, Constraint.IConstraintType type, IModelElement parent)Creates a new constraint from an already parsed syntax tree.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintcreateConstraint(ConstraintSyntaxTree consSyntax)Creates a new constraint with same properties but changed constraint syntax tree.Constraint.IConstraintTypegetType()Returns the conceptual type of the constraint.-
Methods inherited from class net.ssehub.easy.varModel.model.Constraint
accept, getAttachedTo, getConsSyntax, isBooleanConstraint, setConsSyntax, toString
-
Methods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
accept, getNameSpace, getParent, getProject, getQualifiedName, getTopLevelParent, isTopLevel, setParent
-
Methods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.varModel.model.IPartialEvaluable
getParent
-
-
-
-
Field Detail
-
type
private Constraint.IConstraintType type
-
-
Constructor Detail
-
TypedConstraint
public TypedConstraint(ConstraintSyntaxTree consSyntax, Constraint.IConstraintType type, IModelElement parent) throws CSTSemanticException
Creates a new constraint from an already parsed syntax tree.- Parameters:
consSyntax- the constraint syntax treetype- the constraint typeparent- the object, in which this specific one is embedded- Throws:
CSTSemanticException- in case that the constraint semantics cannot be resolved or that the specified constraint does not evaluate to a boolean expression
-
-
Method Detail
-
getType
public Constraint.IConstraintType getType()
Description copied from class:ConstraintReturns the conceptual type of the constraint. Reasoners may return specialized types here.- Overrides:
getTypein classConstraint- Returns:
- the conceptual type (
Constraint.Type.USUAL)
-
createConstraint
public Constraint createConstraint(ConstraintSyntaxTree consSyntax) throws CSTSemanticException
Description copied from class:ConstraintCreates a new constraint with same properties but changed constraint syntax tree.- Overrides:
createConstraintin classConstraint- Parameters:
consSyntax- the syntax tree- Returns:
- the new constraint
- Throws:
CSTSemanticException- in case that the constraint semantics cannot be resolved or that the specified constraint does not evaluate to a boolean expression
-
-