V - VariableT - ValueC - Assignment Contextpublic class AssignmentContextReference<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> extends Object
HasAssignmentContext by calling Model.createReference(HasAssignmentContext).
This reference can be stored with the class implementing the HasAssignmentContext
interface in place of the assignment context AssignmentContext. Assignment context
can be than retrieved from an assignment by calling Assignment.getAssignmentContext(AssignmentContextReference).
This method also create a new context if there is none associated with the assignment yet for
the given reference.
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 getParent().AssignmentContext,
AssignmentContextReference,
HasAssignmentContext| Constructor and Description |
|---|
AssignmentContextReference(HasAssignmentContext<V,T,C> parent,
int index)
Create a reference context
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getIndex()
Return index, a unique number associated with the reference by the
Model. |
HasAssignmentContext<V,T,C> |
getParent()
Return parent class, i.e., the class implementing the
HasAssignmentContext interface. |
int |
hashCode() |
public AssignmentContextReference(HasAssignmentContext<V,T,C> parent, int index)
parent - a class implementing the HasAssignmentContext interfaceindex - a unique index associated with the reference by the Modelpublic int getIndex()
Model.public HasAssignmentContext<V,T,C> getParent()
HasAssignmentContext interface.