|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.palm.dbt.explain.PalmConstraintPlugin
public class PalmConstraintPlugin
Field Summary | |
---|---|
protected boolean |
depending
States if the constraint is depending, that is depends on the validity of other constraints. |
protected boolean |
ephemeral
States if the constraint is ephemeral (that is must be erased as soon a removed from the constraint net). |
Constructor Summary | |
---|---|
PalmConstraintPlugin(AbstractConstraint constraint)
Constructs a plugin for a constraint. |
Method Summary | |
---|---|
void |
activateListener()
Reacts when this listener is reactivated. |
void |
addControl(Constraint father,
int index)
Adds a controlling constraint. |
void |
addDependency(ConstraintCollection e)
Adds the explain of a depending filtering decision. |
void |
addListener()
Reacts when this constraint is added as listener on each involved variable. |
void |
deactivateListener()
Reacts when this listener is deactivated. |
int |
getConstraintIdx()
|
java.util.Set |
getDependencyNet()
|
static int |
getLastTimeStamp()
Returns the last affected time stamp |
SearchInfo |
getSearchInfo()
|
int |
getTimeStamp()
Time stamp of the last activation. |
int |
getWeight()
Gets the weight of the constraint. |
void |
informControllersOfDeactivation()
Informs all the constrolling constraints of modifications on this one. |
boolean |
isDepending()
Checks if the constraint is depending. |
boolean |
isEphemeral()
|
boolean |
isEverConnected()
Checks if this constraint is ever connected. |
boolean |
isIndirect()
Checks if the constraint is indirect. |
void |
removeDependance()
Removes indirect dependance of this constraint: it updates the depending constraints list of all the constraints this one depends on. |
void |
removeDependency(ConstraintCollection e)
Removes the explain of a depending filtering decision. |
void |
self_explain(Explanation e)
Computes the explain associated to this constraint: either this constraint itself if direct, or the addingExplanation if indirect. |
void |
setConstraintIdx(int nb)
Sets the constraint number during the post of teh variable. |
void |
setDependance()
Sets indirect dependance of this constraint: it updates the depending constraints list of all the constraints this one depends on. |
void |
setDepending(PalmExplanation e)
Sets the constraint depending. |
void |
setDirect()
Sets the constraint direct. |
void |
setEphemeral(boolean ephemeral)
|
void |
setIndirect(PalmExplanation e)
Sets the constraint indirect. |
void |
setSearchInfo(SearchInfo searchInfo)
|
void |
setWeight(int weight)
Sets the weight of the constraint. |
void |
undo()
Removes past effects of the constraint in order to remove it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean depending
protected boolean ephemeral
Constructor Detail |
---|
public PalmConstraintPlugin(AbstractConstraint constraint)
constraint
- The constraint this plugin is created for. It should be a PalmConstraint
.Method Detail |
---|
public int getConstraintIdx()
public void setConstraintIdx(int nb)
nb
- Number affected to the constraint.public void addDependency(ConstraintCollection e)
e
- The explain of the filtering decision.public void removeDependency(ConstraintCollection e)
e
- The explain of the filtering decision.public void undo()
public boolean isIndirect()
public void setIndirect(PalmExplanation e)
e
- The explain containing all the constraint this one depends on.public boolean isDepending()
public void setDepending(PalmExplanation e)
public void setDirect()
public void setDependance()
public void removeDependance()
public void informControllersOfDeactivation()
public void addControl(Constraint father, int index)
father
- A new controlling constraint.index
- The index of this constraint in the controlling one.public void self_explain(Explanation e)
addingExplanation
if indirect.
self_explain
in interface ExplainedConstraintPlugin
e
- The explain on which this explain should be merged.public void addListener()
addListener
in interface ConstraintPlugin
public void activateListener()
activateListener
in interface ConstraintPlugin
public void deactivateListener()
deactivateListener
in interface ConstraintPlugin
public boolean isEverConnected()
public int getWeight()
public void setWeight(int weight)
weight
- The new weight.public int getTimeStamp()
public static int getLastTimeStamp()
public void setSearchInfo(SearchInfo searchInfo)
public SearchInfo getSearchInfo()
public java.util.Set getDependencyNet()
public boolean isEphemeral()
public void setEphemeral(boolean ephemeral)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |