org.cpsolver.ifs.assignment.context

## Class AssignmentContextHelper

- java.lang.Object
- - org.cpsolver.ifs.assignment.context.AssignmentContextHelper

-     public class AssignmentContextHelper
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssignmentContextHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> C` | `getContext(HasAssignmentContext<V,T,C> source, Assignment<V,T> assignment)` Returns an assignment context associated with the given object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AssignmentContextHelper

          public AssignmentContextHelper()

  - ### Method Detail

    - #### getContext

          public static <V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> C getContext(HasAssignmentContext<V,T,C> source,
                                                                                                                Assignment<V,T> assignment)

      Returns an assignment context associated with the given object. If there is no assignment context associated with the object yet, one is created using the `HasAssignmentContext.createAssignmentContext(Assignment)` method.
      Parameters:
        `source` - given object
        `assignment` - given assignment, also implementing `CanHoldContext`
      Returns:
        assignment context associated with the given object and the given assignment