V - VariableT - Valuepublic class AssignmentContextHolderMap<V extends Variable<V,T>,T extends Value<V,T>> extends Object implements AssignmentContextHolder<V,T>
HashMap to store all the assignment contexts.
AssignmentContextReference.getIndex() are used to index the map.AssignmentContext,
AssignmentContextReference| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,AssignmentContext> |
iContexts |
| Constructor and Description |
|---|
AssignmentContextHolderMap() |
| Modifier and Type | Method and Description |
|---|---|
<C extends AssignmentContext> |
clearContext(AssignmentContextReference<V,T,C> 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.
|
protected Map<Integer,AssignmentContext> iContexts
public AssignmentContextHolderMap()
public <U extends AssignmentContext> U getAssignmentContext(Assignment<V,T> assignment, AssignmentContextReference<V,T,U> reference)
AssignmentContextHoldergetAssignmentContext in interface AssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>>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)public <C extends AssignmentContext> void clearContext(AssignmentContextReference<V,T,C> reference)
AssignmentContextHolderclearContext in interface AssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>>C - assignment context typereference - a reference (which can be stored within the model, e.g., as an instance variable of a constraint)