V - VariableT - ValueC - Assignment Contextpublic abstract class AbstractClassWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> extends Object implements HasAssignmentContext<V,T,C>, CanHoldContext
ConstraintWithContext or VariableWithContext, however,
it is not tight to a particular class type. Instead getModel()
needs to be implemented.sMaxSize| Constructor and Description |
|---|
AbstractClassWithContext() |
| Modifier and Type | Method and Description |
|---|---|
AssignmentContextReference<V,T,C> |
getAssignmentContextReference()
Returns an assignment context reference
|
AssignmentContext[] |
getContext()
An array of
CanHoldContext.sMaxSize assignment contexts |
C |
getContext(Assignment<V,T> assignment)
Returns an assignment context associated with this object.
|
abstract Model<V,T> |
getModel()
Get the model.
|
void |
setAssignmentContextReference(AssignmentContextReference<V,T,C> reference)
Store an assignment context reference that was given for the class by the
Model.createReference(HasAssignmentContext). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateAssignmentContextpublic AbstractClassWithContext()
public C getContext(Assignment<V,T> assignment)
HasAssignmentContext.createAssignmentContext(Assignment) method.getContext in interface HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext>assignment - given assignmentpublic AssignmentContextReference<V,T,C> getAssignmentContextReference()
HasAssignmentContextgetAssignmentContextReference in interface HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext>Model.createReference(HasAssignmentContext) during initializationpublic void setAssignmentContextReference(AssignmentContextReference<V,T,C> reference)
HasAssignmentContextModel.createReference(HasAssignmentContext).setAssignmentContextReference in interface HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext>reference - reference provided by the model by calling Model.createReference(HasAssignmentContext) during initializationpublic AssignmentContext[] getContext()
CanHoldContextCanHoldContext.sMaxSize assignment contextsgetContext in interface CanHoldContext