Class Context
java.lang.Object
net.ssehub.easy.varModel.model.filter.mandatoryVars.Context
Stores knowledge about the current constraint visitation (the context of earlier elements).
- Author:
- El-Sharkawy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidAdds a parent, e.g.(package private) voidclear()Should be called after a constraint was visited completly, to clear the data.(package private) voidMarks that a compound(access) was visited and that now a slot is visited of the compound.(package private) voidA compound(slot) was visited, back to upper compound.(package private) intdepth()Returns the depth, a depth > 0 means that currently a slot of a compound is visited).(package private) voidMarks that at least one variable was found during the current constraint visitation.(package private) booleanReturns whether variables were changed during the current constraint visitation.(package private) StringReturns the current visited parent of the current variable.(package private) booleanReturns whether currently a qualified name for aIDecisionVariableas parent is stored for the current visitation.
-
Field Details
-
currentParents
-
depth
private int depth -
elementsFound
private boolean elementsFound
-
-
Constructor Details
-
Context
Context()Constructor for this class.
-
-
Method Details
-
clear
void clear()Should be called after a constraint was visited completly, to clear the data. -
compoundDown
void compoundDown()Marks that a compound(access) was visited and that now a slot is visited of the compound.- See Also:
-
compoundUp
void compoundUp()A compound(slot) was visited, back to upper compound.- See Also:
-
depth
int depth()Returns the depth, a depth > 0 means that currently a slot of a compound is visited).- Returns:
- A value >= 0.
-
hasParent
boolean hasParent()Returns whether currently a qualified name for aIDecisionVariableas parent is stored for the current visitation.- Returns:
truea parent exists for the current visited variable.- See Also:
-
getParent
String getParent()Returns the current visited parent of the current variable.- Returns:
- The parent.
- See Also:
-
addParent
Adds a parent, e.g. if a compound access is visited.- Parameters:
parent- The current visited variable, before the visitation of the slot starts.- See Also:
-
elementFound
void elementFound()Marks that at least one variable was found during the current constraint visitation.- See Also:
-
elementsWereFound
boolean elementsWereFound()Returns whether variables were changed during the current constraint visitation.- Returns:
trueAt least one variable was found.- See Also:
-