Enum SelectionOrder
- All Implemented Interfaces:
Serializable
,Comparable<SelectionOrder>
Defines in which order the elements or a selector are selected.
-
Enum Constant Summary
Enum ConstantDescriptionInherit the value from the parentSelectorConfig
.Select the elements in original order.Select in random order, based on the selection probability of each element.Select in random order, without shuffling the elements.Select in random order by shuffling the elements when a selection iterator is created.Select in sorted order by sorting the elements. -
Method Summary
Modifier and TypeMethodDescriptionstatic SelectionOrder
fromRandomSelectionBoolean
(boolean randomSelection) static SelectionOrder
resolve
(SelectionOrder selectionOrder, SelectionOrder inheritedSelectionOrder) boolean
static SelectionOrder
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.
-
Enum Constant Details
-
INHERIT
Inherit the value from the parentSelectorConfig
. If the parent is cached, the value is changed toORIGINAL
.This is the default. If there is no such parent, then it defaults to
RANDOM
. -
ORIGINAL
Select the elements in original order. -
SORTED
Select in sorted order by sorting the elements. Each element will be selected exactly once (if all elements end up being selected). RequiresSelectionCacheType.STEP
or higher. -
RANDOM
Select in random order, without shuffling the elements. Each element might be selected multiple times. Scales well because it does not require caching. -
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). RequiresSelectionCacheType.STEP
or higher. -
PROBABILISTIC
Select in random order, based on the selection probability of each element. Elements with a higher probability have a higher chance to be selected than elements with a lower probability. Each element might be selected multiple times. RequiresSelectionCacheType.STEP
or higher.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
resolve
public static SelectionOrder resolve(SelectionOrder selectionOrder, SelectionOrder inheritedSelectionOrder) - Parameters:
selectionOrder
- sometimes nullinheritedSelectionOrder
- never null- Returns:
- never null
-
fromRandomSelectionBoolean
-
toRandomSelectionBoolean
public boolean toRandomSelectionBoolean()
-