V - VariableT - Valuepublic interface AssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>>
AssignmentContextReference.getIndex() can be used to index stored contexts.
A new assignment context can be created for a reference by calling HasAssignmentContext.createAssignmentContext(Assignment)
on the AssignmentContextReference.getParent().AssignmentContext,
AssignmentContextReference,
HasAssignmentContext| Modifier and Type | Method and Description |
|---|---|
<U extends AssignmentContext> |
clearContext(AssignmentContextReference<V,T,U> reference)
Clear an assignment context that is associated with the given a reference.
|
<U extends AssignmentContext> |
getAssignmentContext(Assignment<V,T> assignment,
AssignmentContextReference<V,T,U> reference)
Return assignment context for the given assignment and reference.
|
<U extends AssignmentContext> U getAssignmentContext(Assignment<V,T> assignment, AssignmentContextReference<V,T,U> reference)
U - assignment context typeassignment - current assignment (there is only one assignment associated with one holder, but
the assignment is passed so that HasAssignmentContext.createAssignmentContext(Assignment) can be called if neededreference - a reference created by calling Model.createReference(HasAssignmentContext)<U extends AssignmentContext> void clearContext(AssignmentContextReference<V,T,U> reference)
U - assignment context typereference - a reference (which can be stored within the model, e.g., as an instance variable of a constraint)