Class DefaultConstraint
- 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.DefaultConstraint
-
- All Implemented Interfaces:
IDatatypeVisitable,IModelElement,IPartialEvaluable
public class DefaultConstraint extends Constraint
Reasoner specific constraint type indicating aConstraint.Type.DEFAULTconstraint. This shall avoid requiring an attribute for this purpose for all constraints and using it just for temporary reasoning ones.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.ssehub.easy.varModel.model.Constraint
Constraint.IConstraintType, Constraint.Type
-
-
Constructor Summary
Constructors Constructor Description DefaultConstraint(ConstraintSyntaxTree consSyntax, 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
-
-
-
-
Constructor Detail
-
DefaultConstraint
public DefaultConstraint(ConstraintSyntaxTree consSyntax, IModelElement parent) throws CSTSemanticException
Creates a new constraint from an already parsed syntax tree.- Parameters:
consSyntax- the constraint syntax treeparent- 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()
Returns the conceptual type of the constraint.- Overrides:
getTypein classConstraint- Returns:
- the conceptual type (
Constraint.Type.DEFAULT)
-
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
-
-