org.optaplanner.core.api.domain.lookup

## Enum LookUpStrategyType

- java.lang.Object
- - java.lang.Enum<LookUpStrategyType>
  - - org.optaplanner.core.api.domain.lookup.LookUpStrategyType

- All Implemented Interfaces:
    Serializable, Comparable<LookUpStrategyType>

      public enum LookUpStrategyType
      extends Enum<LookUpStrategyType>

  Determines how `ScoreDirector.lookUpWorkingObject(Object)` maps a `problem fact` or a `planning entity` from an external copy to the internal one.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `EQUALITY` Map by `equals(Object)` and `hashCode()`.
    `NONE` There is no mapping and `ScoreDirector.lookUpWorkingObject(Object)` must not be used.
    `PLANNING_ID_OR_FAIL_FAST` Map by the same `PlanningId` field or method.
    `PLANNING_ID_OR_NONE` Map by the same `PlanningId` field or method.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static LookUpStrategyType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static LookUpStrategyType[]` | `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

    - #### PLANNING_ID_OR_NONE

          public static final LookUpStrategyType PLANNING_ID_OR_NONE

      Map by the same `PlanningId` field or method. If there is no such field or method, there is no mapping and `ScoreDirector.lookUpWorkingObject(Object)` must not be used. If there is such a field or method, but it returns null, it fails fast.

      This is the default.

    - #### PLANNING_ID_OR_FAIL_FAST

          public static final LookUpStrategyType PLANNING_ID_OR_FAIL_FAST

      Map by the same `PlanningId` field or method. If there is no such field or method, it fails fast.

    - #### EQUALITY

          public static final LookUpStrategyType EQUALITY

      Map by `equals(Object)` and `hashCode()`. If any of these two methods is not overridden by the working object's class or some of its superclasses, `ScoreDirector.lookUpWorkingObject(Object)` must not be used because it cannot work correctly with `Object`'s equals and hashCode implementations.

    - #### NONE

          public static final LookUpStrategyType NONE

      There is no mapping and `ScoreDirector.lookUpWorkingObject(Object)` must not be used.

  - ### Method Detail

    - #### values

          public static LookUpStrategyType[] 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 (LookUpStrategyType c : LookUpStrategyType.values())
              System.out.println(c);

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

    - #### valueOf

          public static LookUpStrategyType 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

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.