Enum Class RetrievalSemantics

java.lang.Object
java.lang.Enum<RetrievalSemantics>
ai.timefold.solver.core.impl.score.stream.common.RetrievalSemantics
All Implemented Interfaces:
Serializable, Comparable<RetrievalSemantics>, Constable

public enum RetrievalSemantics extends Enum<RetrievalSemantics>
Determines the behavior of joins and conditional propagation based on whether they are coming off of a constraint stream started by either ConstraintFactory.from(Class), ConstraintFactory.forEach(Class), or PrecomputeFactory.forEachUnfiltered(Class) family of methods.

For classes which are not planning entities, all of their instances are always retrieved. For classes which are planning entities, the difference in behavior depends on whether they use planning variables which allow unassigned values.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    this semantics is deprecated and kept around for backward compatibility reasons.
    Joins and conditional propagation always include entities with null planning variables, regardless of whether their planning variables allow unassigned values.
    Joins do not include entities with null planning variables, unless specifically requested by join(forEachIncludingUnassigned(...)).
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • STANDARD

      public static final RetrievalSemantics STANDARD
      Joins do not include entities with null planning variables, unless specifically requested by join(forEachIncludingUnassigned(...)). Conditional propagation does not include null planning variables, unless specifically requested using a *IncludingUnassigned() method overload.

      Applies when the stream comes off of a ConstraintFactory.forEach(Class) family of methods.

    • PRECOMPUTE

      public static final RetrievalSemantics PRECOMPUTE
      Joins and conditional propagation always include entities with null planning variables, regardless of whether their planning variables allow unassigned values.

      Applies when the stream comes off of a PrecomputeFactory.forEachUnfiltered(Class) family of methods.

    • LEGACY

      @Deprecated(forRemoval=true) public static final RetrievalSemantics LEGACY
      Deprecated, for removal: This API element is subject to removal in a future version.
      this semantics is deprecated and kept around for backward compatibility reasons. It will be removed in 2.0, together with the from() family of methods, along with this entire enum.
      Joins include entities with null planning variables if these variables allow unassigned values. Conditional propagation always includes entities with null planning variables, regardless of whether their planning variables allow unassigned values.

      Applies when the stream comes off of a ConstraintFactory.from(Class) family of methods.

  • Method Details

    • values

      public static RetrievalSemantics[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RetrievalSemantics valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null