agg.xt_basis
Class Constraint_Attribute

java.lang.Object
  extended by agg.util.csp.BinaryConstraint
      extended by agg.xt_basis.Constraint_Attribute
All Implemented Interfaces:
InstantiationHook

public class Constraint_Attribute
extends BinaryConstraint
implements InstantiationHook


Field Summary
 
Fields inherited from class agg.util.csp.BinaryConstraint
itsVar1, itsVar2, itsWeight
 
Constructor Summary
Constraint_Attribute(GraphObject graphobj, Variable var, AttrContext ac, AttrManager man)
           
 
Method Summary
 void clear()
           
 boolean execute()
          Return true iff the attributes of graphobj and of the current instance of var match.
 GraphObject getGraphObject()
           
 void instantiate_intern(Variable var)
           
 void instantiate(Variable var)
          This method is called whenever the variable I'm hooked to gets instantiated.
 void uninstantiate_intern(Variable var)
           
 void uninstantiate(Variable var)
          This method is called whenever the variable I'm hooked to gets uninstantiated, or when it is set to a new value.
 
Methods inherited from class agg.util.csp.BinaryConstraint
activate, deactivate, getCause, getVar1, getVar2, getWeight, isApplicable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Constraint_Attribute

public Constraint_Attribute(GraphObject graphobj,
                            Variable var,
                            AttrContext ac,
                            AttrManager man)
Method Detail

clear

public void clear()
Specified by:
clear in class BinaryConstraint

execute

public final boolean execute()
Return true iff the attributes of graphobj and of the current instance of var match. (The names correspond to my constructor arguments.)

Specified by:
execute in class BinaryConstraint

instantiate

public final void instantiate(Variable var)
Description copied from interface: InstantiationHook
This method is called whenever the variable I'm hooked to gets instantiated. It is called after the new value has been set, with the variable as an argument.

Specified by:
instantiate in interface InstantiationHook

uninstantiate

public final void uninstantiate(Variable var)
Description copied from interface: InstantiationHook
This method is called whenever the variable I'm hooked to gets uninstantiated, or when it is set to a new value. It is called before the value is re- or unset, with the variable as an argument.

Specified by:
uninstantiate in interface InstantiationHook

instantiate_intern

public final void instantiate_intern(Variable var)

uninstantiate_intern

public final void uninstantiate_intern(Variable var)

getGraphObject

public GraphObject getGraphObject()