OptaPlanner core 6.0.0.CR2

org.optaplanner.core.impl.heuristic.selector.common
Enum SelectionCacheType

java.lang.Object
  extended by java.lang.Enum<SelectionCacheType>
      extended by org.optaplanner.core.impl.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
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
 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)

OptaPlanner core 6.0.0.CR2

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.