org.optaplanner.core.config.heuristic.selector.common

## Enum SelectionCacheType

- java.lang.Object
- - java.lang.Enum<SelectionCacheType>
  - - org.optaplanner.core.config.heuristic.selector.common.SelectionCacheType

- All Implemented Interfaces:
    Serializable, Comparable<SelectionCacheType>

      public enum SelectionCacheType
      extends Enum<SelectionCacheType>

  There is no INHERIT by design because 2 sequential caches provides no benefit, only memory overhead.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `JUST_IN_TIME` Just in time, when the move is created.
    `PHASE` When the phase is started.
    `SOLVER` When the solver is started.
    `STEP` When the step is started.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isCached()`
    `boolean` | `isNotCached()`
    `static SelectionCacheType` | `max(SelectionCacheType a, SelectionCacheType b)`
    `static SelectionCacheType` | `resolve(SelectionCacheType cacheType, SelectionCacheType minimumCacheType)`
    `static SelectionCacheType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static SelectionCacheType[]` | `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

    - #### JUST_IN_TIME

          public static final SelectionCacheType JUST_IN_TIME

      Just in time, when the move is created. This is effectively no caching. This is the default for most selectors.

    - #### STEP

          public static final SelectionCacheType STEP

      When the step is started.

    - #### PHASE

          public static final SelectionCacheType PHASE

      When the phase is started.

    - #### SOLVER

          public static final SelectionCacheType SOLVER

      When the solver is started.

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

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

    - #### resolve

          public static SelectionCacheType resolve(SelectionCacheType cacheType,
                                                   SelectionCacheType minimumCacheType)

    - #### isCached

          public boolean isCached()

    - #### isNotCached

          public boolean isNotCached()

    - #### max

          public static SelectionCacheType max(SelectionCacheType a,
                                               SelectionCacheType b)

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