org.drools.planner.config.heuristic.selector.common
Enum SelectionOrder

java.lang.Object
  extended by java.lang.Enum<SelectionOrder>
      extended by org.drools.planner.config.heuristic.selector.common.SelectionOrder
All Implemented Interfaces:
Serializable, Comparable<SelectionOrder>

public enum SelectionOrder
extends Enum<SelectionOrder>

Defines in which order


Enum Constant Summary
INHERIT
          Inherit the value from the parent .
ORIGINAL
          Select in the elements in original order.
RANDOM
          Select in random order, without shuffling the elements.
SHUFFLED
          Select in random order by shuffling the elements when a selection iterator is created.
 
Method Summary
static SelectionOrder resolve(SelectionOrder selectionOrder, SelectionOrder inheritedSelectionOrder)
           
static SelectionOrder valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SelectionOrder[] 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

INHERIT

public static final SelectionOrder INHERIT
Inherit the value from the parent . If the parent is SHUFFLED, the value is set to ORIGINAL.

This is the default. If there is no such parent, then it defaults to RANDOM.


ORIGINAL

public static final SelectionOrder ORIGINAL
Select in the elements in original order.


RANDOM

public static final SelectionOrder RANDOM
Select in random order, without shuffling the elements. Each element might be selected multiple times.


SHUFFLED

public static final SelectionOrder SHUFFLED
Select in random order by shuffling the elements when a selection iterator is created. Each element will be selected exactly once (if all elements end up being selected). Requires SelectionCacheType.STEP or higher.

Method Detail

values

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

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

valueOf

public static SelectionOrder 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 SelectionOrder resolve(SelectionOrder selectionOrder,
                                     SelectionOrder inheritedSelectionOrder)


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.