org.cpsolver.ifs.assignment.context

## Enum ModelWithContext.ContextUpdateType

- java.lang.Object
- - java.lang.Enum<ModelWithContext.ContextUpdateType>
  - - org.cpsolver.ifs.assignment.context.ModelWithContext.ContextUpdateType

- All Implemented Interfaces:
    Serializable, Comparable<ModelWithContext.ContextUpdateType>
  Enclosing class:
    ModelWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentConstraintContext<V,T>>

      protected static enum ModelWithContext.ContextUpdateType
      extends Enum<ModelWithContext.ContextUpdateType>

  Defines how the context of the model should be automatically updated (i.e., when `AssignmentConstraintContext.assigned(Assignment, Value)` and `AssignmentConstraintContext.unassigned(Assignment, Value)` are called).

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `AfterUnassignedAfterAssigned` Update is done after an unassignment and after an assignment.
    `AfterUnassignedBeforeAssigned` Update is done after an unassignment and before an assignment.
    `BeforeUnassignedAfterAssigned` Update is done before an unassignment and after an assignment.
    `BeforeUnassignedBeforeAssigned` Update is done before an unassignment and before an assignment.
    `NoUpdate` Context is to be updated manually.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ModelWithContext.ContextUpdateType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ModelWithContext.ContextUpdateType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### BeforeUnassignedBeforeAssigned

          public static final ModelWithContext.ContextUpdateType BeforeUnassignedBeforeAssigned

      Update is done before an unassignment and before an assignment.

    - #### AfterUnassignedBeforeAssigned

          public static final ModelWithContext.ContextUpdateType AfterUnassignedBeforeAssigned

      Update is done after an unassignment and before an assignment.

    - #### BeforeUnassignedAfterAssigned

          public static final ModelWithContext.ContextUpdateType BeforeUnassignedAfterAssigned

      Update is done before an unassignment and after an assignment.

    - #### AfterUnassignedAfterAssigned

          public static final ModelWithContext.ContextUpdateType AfterUnassignedAfterAssigned

      Update is done after an unassignment and after an assignment. This is the default.

    - #### NoUpdate

          public static final ModelWithContext.ContextUpdateType NoUpdate

      Context is to be updated manually.

  - ### Method Detail

    - #### values

          public static ModelWithContext.ContextUpdateType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (ModelWithContext.ContextUpdateType c : ModelWithContext.ContextUpdateType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static ModelWithContext.ContextUpdateType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null