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 howScoreDirector.lookUpWorkingObject(Object)
maps aproblem fact
or aplanning entity
from an external copy to the internal one.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EQUALITY
Map byequals(Object)
andhashCode()
.NONE
There is no mapping andScoreDirector.lookUpWorkingObject(Object)
must not be used.PLANNING_ID_OR_FAIL_FAST
Map by the samePlanningId
field or method.PLANNING_ID_OR_NONE
Map by the samePlanningId
field or method.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Enum Constant Detail
-
PLANNING_ID_OR_NONE
public static final LookUpStrategyType PLANNING_ID_OR_NONE
Map by the samePlanningId
field or method. If there is no such field or method, there is no mapping andScoreDirector.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 samePlanningId
field or method. If there is no such field or method, it fails fast.
-
EQUALITY
public static final LookUpStrategyType EQUALITY
Map byequals(Object)
andhashCode()
. 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 withObject
's equals and hashCode implementations.
-
NONE
public static final LookUpStrategyType NONE
There is no mapping andScoreDirector.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 nameNullPointerException
- if the argument is null
-
-