Package net.bmahe.genetics4j.gpu.spec
Class ImmutableGPUEAExecutionContext.Builder<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.gpu.spec.ImmutableGPUEAExecutionContext.Builder<T>
- Enclosing class:
ImmutableGPUEAExecutionContext<T extends Comparable<T>>
public static final class ImmutableGPUEAExecutionContext.Builder<T extends Comparable<T>>
extends Object
Builds instances of type
ImmutableGPUEAExecutionContext
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
Modifier and TypeFieldDescriptionprivate List
<ChromosomeCombinatorHandlerFactory<T>> private ChromosomeFactoryProvider
private List
<ChromosomeMutationHandlerFactory<T>> private List
<ChromosomeCombinatorHandler<T>> private List
<ChromosomeMutationHandler<? extends Chromosome>> private List
<MutationPolicyHandler<T>> private List
<ReplacementStrategyHandler<T>> private List
<SelectionPolicyHandler<T>> private List
<EvolutionListener<T>> private List
<MutationPolicyHandlerFactory<T>> private static final long
private static final long
private static final long
private static final long
private static final long
private static final long
private static final long
private long
private int
private RandomGenerator
private List
<ReplacementStrategyHandlerFactory<T>> private List
<SelectionPolicyHandlerFactory<T>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllChromosomeCombinatorHandlerFactories
(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Adds elements tochromosomeCombinatorHandlerFactories
list.addAllChromosomeMutationPolicyHandlerFactories
(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Adds elements tochromosomeMutationPolicyHandlerFactories
list.addAllDefaultChromosomeCombinatorHandlers
(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Adds elements todefaultChromosomeCombinatorHandlers
list.addAllDefaultChromosomeMutationPolicyHandlers
(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Adds elements todefaultChromosomeMutationPolicyHandlers
list.addAllDefaultMutationPolicyHandlers
(Iterable<? extends MutationPolicyHandler<T>> elements) Adds elements todefaultMutationPolicyHandlers
list.addAllDefaultReplacementStrategyHandlers
(Iterable<? extends ReplacementStrategyHandler<T>> elements) Adds elements todefaultReplacementStrategyHandlers
list.addAllDefaultSelectionPolicyHandlers
(Iterable<? extends SelectionPolicyHandler<T>> elements) Adds elements todefaultSelectionPolicyHandlers
list.addAllEvolutionListeners
(Iterable<? extends EvolutionListener<T>> elements) Adds elements toevolutionListeners
list.addAllMutationPolicyHandlerFactories
(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Adds elements tomutationPolicyHandlerFactories
list.addAllReplacementStrategyHandlerFactories
(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Adds elements toreplacementStrategyHandlerFactories
list.addAllSelectionPolicyHandlerFactories
(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Adds elements toselectionPolicyHandlerFactories
list.Adds one element tochromosomeCombinatorHandlerFactories
list.Adds elements tochromosomeCombinatorHandlerFactories
list.Adds one element tochromosomeMutationPolicyHandlerFactories
list.Adds elements tochromosomeMutationPolicyHandlerFactories
list.Adds one element todefaultChromosomeCombinatorHandlers
list.Adds elements todefaultChromosomeCombinatorHandlers
list.addDefaultChromosomeMutationPolicyHandlers
(ChromosomeMutationHandler<? extends Chromosome> element) Adds one element todefaultChromosomeMutationPolicyHandlers
list.addDefaultChromosomeMutationPolicyHandlers
(ChromosomeMutationHandler<? extends Chromosome>... elements) Adds elements todefaultChromosomeMutationPolicyHandlers
list.Adds one element todefaultMutationPolicyHandlers
list.addDefaultMutationPolicyHandlers
(MutationPolicyHandler<T>... elements) Adds elements todefaultMutationPolicyHandlers
list.Adds one element todefaultReplacementStrategyHandlers
list.addDefaultReplacementStrategyHandlers
(ReplacementStrategyHandler<T>... elements) Adds elements todefaultReplacementStrategyHandlers
list.Adds one element todefaultSelectionPolicyHandlers
list.addDefaultSelectionPolicyHandlers
(SelectionPolicyHandler<T>... elements) Adds elements todefaultSelectionPolicyHandlers
list.addEvolutionListeners
(EvolutionListener<T> element) Adds one element toevolutionListeners
list.addEvolutionListeners
(EvolutionListener<T>... elements) Adds elements toevolutionListeners
list.Adds one element tomutationPolicyHandlerFactories
list.addMutationPolicyHandlerFactories
(MutationPolicyHandlerFactory<T>... elements) Adds elements tomutationPolicyHandlerFactories
list.Adds one element toreplacementStrategyHandlerFactories
list.Adds elements toreplacementStrategyHandlerFactories
list.Adds one element toselectionPolicyHandlerFactories
list.addSelectionPolicyHandlerFactories
(SelectionPolicyHandlerFactory<T>... elements) Adds elements toselectionPolicyHandlerFactories
list.build()
Builds a newImmutableGPUEAExecutionContext
.chromosomeCombinatorHandlerFactories
(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeCombinatorHandlerFactories
list.chromosomeFactoryProvider
(ChromosomeFactoryProvider chromosomeFactoryProvider) Initializes the value for thechromosomeFactoryProvider
attribute.chromosomeMutationPolicyHandlerFactories
(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeMutationPolicyHandlerFactories
list.defaultChromosomeCombinatorHandlers
(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Sets or replaces all elements fordefaultChromosomeCombinatorHandlers
list.private boolean
defaultChromosomeMutationPolicyHandlers
(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Sets or replaces all elements fordefaultChromosomeMutationPolicyHandlers
list.private boolean
defaultMutationPolicyHandlers
(Iterable<? extends MutationPolicyHandler<T>> elements) Sets or replaces all elements fordefaultMutationPolicyHandlers
list.private boolean
defaultReplacementStrategyHandlers
(Iterable<? extends ReplacementStrategyHandler<T>> elements) Sets or replaces all elements fordefaultReplacementStrategyHandlers
list.private boolean
defaultSelectionPolicyHandlers
(Iterable<? extends SelectionPolicyHandler<T>> elements) Sets or replaces all elements fordefaultSelectionPolicyHandlers
list.private boolean
deviceFilters
(Predicate<Device> deviceFilters) Initializes the value for thedeviceFilters
attribute.evolutionListeners
(Iterable<? extends EvolutionListener<T>> elements) Sets or replaces all elements forevolutionListeners
list.private boolean
from
(GPUEAExecutionContext<T> instance) Fill a builder with attribute values from the providedGPUEAExecutionContext
instance.mutationPolicyHandlerFactories
(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Sets or replaces all elements formutationPolicyHandlerFactories
list.platformFilters
(Predicate<Platform> platformFilters) Initializes the value for theplatformFilters
attribute.populationSize
(int populationSize) Initializes the value for thepopulationSize
attribute.private boolean
randomGenerator
(RandomGenerator randomGenerator) Initializes the value for therandomGenerator
attribute.replacementStrategyHandlerFactories
(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Sets or replaces all elements forreplacementStrategyHandlerFactories
list.selectionPolicyHandlerFactories
(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Sets or replaces all elements forselectionPolicyHandlerFactories
list.
-
Field Details
-
OPT_BIT_DEFAULT_CHROMOSOME_COMBINATOR_HANDLERS
private static final long OPT_BIT_DEFAULT_CHROMOSOME_COMBINATOR_HANDLERS- See Also:
-
OPT_BIT_DEFAULT_SELECTION_POLICY_HANDLERS
private static final long OPT_BIT_DEFAULT_SELECTION_POLICY_HANDLERS- See Also:
-
OPT_BIT_DEFAULT_MUTATION_POLICY_HANDLERS
private static final long OPT_BIT_DEFAULT_MUTATION_POLICY_HANDLERS- See Also:
-
OPT_BIT_DEFAULT_CHROMOSOME_MUTATION_POLICY_HANDLERS
private static final long OPT_BIT_DEFAULT_CHROMOSOME_MUTATION_POLICY_HANDLERS- See Also:
-
OPT_BIT_DEFAULT_REPLACEMENT_STRATEGY_HANDLERS
private static final long OPT_BIT_DEFAULT_REPLACEMENT_STRATEGY_HANDLERS- See Also:
-
OPT_BIT_POPULATION_SIZE
private static final long OPT_BIT_POPULATION_SIZE- See Also:
-
OPT_BIT_EVOLUTION_LISTENERS
private static final long OPT_BIT_EVOLUTION_LISTENERS- See Also:
-
optBits
private long optBits -
defaultChromosomeCombinatorHandlers
private List<ChromosomeCombinatorHandler<T extends Comparable<T>>> defaultChromosomeCombinatorHandlers -
chromosomeCombinatorHandlerFactories
private List<ChromosomeCombinatorHandlerFactory<T extends Comparable<T>>> chromosomeCombinatorHandlerFactories -
defaultSelectionPolicyHandlers
-
selectionPolicyHandlerFactories
private List<SelectionPolicyHandlerFactory<T extends Comparable<T>>> selectionPolicyHandlerFactories -
defaultMutationPolicyHandlers
-
mutationPolicyHandlerFactories
-
defaultChromosomeMutationPolicyHandlers
private List<ChromosomeMutationHandler<? extends Chromosome>> defaultChromosomeMutationPolicyHandlers -
chromosomeMutationPolicyHandlerFactories
private List<ChromosomeMutationHandlerFactory<T extends Comparable<T>>> chromosomeMutationPolicyHandlerFactories -
defaultReplacementStrategyHandlers
private List<ReplacementStrategyHandler<T extends Comparable<T>>> defaultReplacementStrategyHandlers -
replacementStrategyHandlerFactories
private List<ReplacementStrategyHandlerFactory<T extends Comparable<T>>> replacementStrategyHandlerFactories -
randomGenerator
-
populationSize
private int populationSize -
chromosomeFactoryProvider
-
evolutionListeners
-
platformFilters
-
deviceFilters
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedGPUEAExecutionContext
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addDefaultChromosomeCombinatorHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultChromosomeCombinatorHandlers(ChromosomeCombinatorHandler<T> element) Adds one element todefaultChromosomeCombinatorHandlers
list.- Parameters:
element
- A defaultChromosomeCombinatorHandlers element- Returns:
this
builder for use in a chained invocation
-
addDefaultChromosomeCombinatorHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultChromosomeCombinatorHandlers(ChromosomeCombinatorHandler<T>... elements) Adds elements todefaultChromosomeCombinatorHandlers
list.- Parameters:
elements
- An array of defaultChromosomeCombinatorHandlers elements- Returns:
this
builder for use in a chained invocation
-
defaultChromosomeCombinatorHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> defaultChromosomeCombinatorHandlers(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Sets or replaces all elements fordefaultChromosomeCombinatorHandlers
list.- Parameters:
elements
- An iterable of defaultChromosomeCombinatorHandlers elements- Returns:
this
builder for use in a chained invocation
-
addAllDefaultChromosomeCombinatorHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addAllDefaultChromosomeCombinatorHandlers(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Adds elements todefaultChromosomeCombinatorHandlers
list.- Parameters:
elements
- An iterable of defaultChromosomeCombinatorHandlers elements- Returns:
this
builder for use in a chained invocation
-
addChromosomeCombinatorHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addChromosomeCombinatorHandlerFactories(ChromosomeCombinatorHandlerFactory<T> element) Adds one element tochromosomeCombinatorHandlerFactories
list.- Parameters:
element
- A chromosomeCombinatorHandlerFactories element- Returns:
this
builder for use in a chained invocation
-
addChromosomeCombinatorHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addChromosomeCombinatorHandlerFactories(ChromosomeCombinatorHandlerFactory<T>... elements) Adds elements tochromosomeCombinatorHandlerFactories
list.- Parameters:
elements
- An array of chromosomeCombinatorHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
chromosomeCombinatorHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> chromosomeCombinatorHandlerFactories(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeCombinatorHandlerFactories
list.- Parameters:
elements
- An iterable of chromosomeCombinatorHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addAllChromosomeCombinatorHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addAllChromosomeCombinatorHandlerFactories(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Adds elements tochromosomeCombinatorHandlerFactories
list.- Parameters:
elements
- An iterable of chromosomeCombinatorHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addDefaultSelectionPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultSelectionPolicyHandlers(SelectionPolicyHandler<T> element) Adds one element todefaultSelectionPolicyHandlers
list.- Parameters:
element
- A defaultSelectionPolicyHandlers element- Returns:
this
builder for use in a chained invocation
-
addDefaultSelectionPolicyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultSelectionPolicyHandlers(SelectionPolicyHandler<T>... elements) Adds elements todefaultSelectionPolicyHandlers
list.- Parameters:
elements
- An array of defaultSelectionPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
defaultSelectionPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> defaultSelectionPolicyHandlers(Iterable<? extends SelectionPolicyHandler<T>> elements) Sets or replaces all elements fordefaultSelectionPolicyHandlers
list.- Parameters:
elements
- An iterable of defaultSelectionPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addAllDefaultSelectionPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addAllDefaultSelectionPolicyHandlers(Iterable<? extends SelectionPolicyHandler<T>> elements) Adds elements todefaultSelectionPolicyHandlers
list.- Parameters:
elements
- An iterable of defaultSelectionPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addSelectionPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addSelectionPolicyHandlerFactories(SelectionPolicyHandlerFactory<T> element) Adds one element toselectionPolicyHandlerFactories
list.- Parameters:
element
- A selectionPolicyHandlerFactories element- Returns:
this
builder for use in a chained invocation
-
addSelectionPolicyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addSelectionPolicyHandlerFactories(SelectionPolicyHandlerFactory<T>... elements) Adds elements toselectionPolicyHandlerFactories
list.- Parameters:
elements
- An array of selectionPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
selectionPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> selectionPolicyHandlerFactories(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Sets or replaces all elements forselectionPolicyHandlerFactories
list.- Parameters:
elements
- An iterable of selectionPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addAllSelectionPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addAllSelectionPolicyHandlerFactories(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Adds elements toselectionPolicyHandlerFactories
list.- Parameters:
elements
- An iterable of selectionPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addDefaultMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultMutationPolicyHandlers(MutationPolicyHandler<T> element) Adds one element todefaultMutationPolicyHandlers
list.- Parameters:
element
- A defaultMutationPolicyHandlers element- Returns:
this
builder for use in a chained invocation
-
addDefaultMutationPolicyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultMutationPolicyHandlers(MutationPolicyHandler<T>... elements) Adds elements todefaultMutationPolicyHandlers
list.- Parameters:
elements
- An array of defaultMutationPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
defaultMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> defaultMutationPolicyHandlers(Iterable<? extends MutationPolicyHandler<T>> elements) Sets or replaces all elements fordefaultMutationPolicyHandlers
list.- Parameters:
elements
- An iterable of defaultMutationPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addAllDefaultMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addAllDefaultMutationPolicyHandlers(Iterable<? extends MutationPolicyHandler<T>> elements) Adds elements todefaultMutationPolicyHandlers
list.- Parameters:
elements
- An iterable of defaultMutationPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addMutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addMutationPolicyHandlerFactories(MutationPolicyHandlerFactory<T> element) Adds one element tomutationPolicyHandlerFactories
list.- Parameters:
element
- A mutationPolicyHandlerFactories element- Returns:
this
builder for use in a chained invocation
-
addMutationPolicyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addMutationPolicyHandlerFactories(MutationPolicyHandlerFactory<T>... elements) Adds elements tomutationPolicyHandlerFactories
list.- Parameters:
elements
- An array of mutationPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
mutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> mutationPolicyHandlerFactories(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Sets or replaces all elements formutationPolicyHandlerFactories
list.- Parameters:
elements
- An iterable of mutationPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addAllMutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addAllMutationPolicyHandlerFactories(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Adds elements tomutationPolicyHandlerFactories
list.- Parameters:
elements
- An iterable of mutationPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addDefaultChromosomeMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultChromosomeMutationPolicyHandlers(ChromosomeMutationHandler<? extends Chromosome> element) Adds one element todefaultChromosomeMutationPolicyHandlers
list.- Parameters:
element
- A defaultChromosomeMutationPolicyHandlers element- Returns:
this
builder for use in a chained invocation
-
addDefaultChromosomeMutationPolicyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultChromosomeMutationPolicyHandlers(ChromosomeMutationHandler<? extends Chromosome>... elements) Adds elements todefaultChromosomeMutationPolicyHandlers
list.- Parameters:
elements
- An array of defaultChromosomeMutationPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
defaultChromosomeMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> defaultChromosomeMutationPolicyHandlers(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Sets or replaces all elements fordefaultChromosomeMutationPolicyHandlers
list.- Parameters:
elements
- An iterable of defaultChromosomeMutationPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addAllDefaultChromosomeMutationPolicyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addAllDefaultChromosomeMutationPolicyHandlers(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Adds elements todefaultChromosomeMutationPolicyHandlers
list.- Parameters:
elements
- An iterable of defaultChromosomeMutationPolicyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addChromosomeMutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addChromosomeMutationPolicyHandlerFactories(ChromosomeMutationHandlerFactory<T> element) Adds one element tochromosomeMutationPolicyHandlerFactories
list.- Parameters:
element
- A chromosomeMutationPolicyHandlerFactories element- Returns:
this
builder for use in a chained invocation
-
addChromosomeMutationPolicyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addChromosomeMutationPolicyHandlerFactories(ChromosomeMutationHandlerFactory<T>... elements) Adds elements tochromosomeMutationPolicyHandlerFactories
list.- Parameters:
elements
- An array of chromosomeMutationPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
chromosomeMutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> chromosomeMutationPolicyHandlerFactories(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeMutationPolicyHandlerFactories
list.- Parameters:
elements
- An iterable of chromosomeMutationPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addAllChromosomeMutationPolicyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addAllChromosomeMutationPolicyHandlerFactories(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Adds elements tochromosomeMutationPolicyHandlerFactories
list.- Parameters:
elements
- An iterable of chromosomeMutationPolicyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addDefaultReplacementStrategyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultReplacementStrategyHandlers(ReplacementStrategyHandler<T> element) Adds one element todefaultReplacementStrategyHandlers
list.- Parameters:
element
- A defaultReplacementStrategyHandlers element- Returns:
this
builder for use in a chained invocation
-
addDefaultReplacementStrategyHandlers
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addDefaultReplacementStrategyHandlers(ReplacementStrategyHandler<T>... elements) Adds elements todefaultReplacementStrategyHandlers
list.- Parameters:
elements
- An array of defaultReplacementStrategyHandlers elements- Returns:
this
builder for use in a chained invocation
-
defaultReplacementStrategyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> defaultReplacementStrategyHandlers(Iterable<? extends ReplacementStrategyHandler<T>> elements) Sets or replaces all elements fordefaultReplacementStrategyHandlers
list.- Parameters:
elements
- An iterable of defaultReplacementStrategyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addAllDefaultReplacementStrategyHandlers
public final ImmutableGPUEAExecutionContext.Builder<T> addAllDefaultReplacementStrategyHandlers(Iterable<? extends ReplacementStrategyHandler<T>> elements) Adds elements todefaultReplacementStrategyHandlers
list.- Parameters:
elements
- An iterable of defaultReplacementStrategyHandlers elements- Returns:
this
builder for use in a chained invocation
-
addReplacementStrategyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addReplacementStrategyHandlerFactories(ReplacementStrategyHandlerFactory<T> element) Adds one element toreplacementStrategyHandlerFactories
list.- Parameters:
element
- A replacementStrategyHandlerFactories element- Returns:
this
builder for use in a chained invocation
-
addReplacementStrategyHandlerFactories
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addReplacementStrategyHandlerFactories(ReplacementStrategyHandlerFactory<T>... elements) Adds elements toreplacementStrategyHandlerFactories
list.- Parameters:
elements
- An array of replacementStrategyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
replacementStrategyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> replacementStrategyHandlerFactories(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Sets or replaces all elements forreplacementStrategyHandlerFactories
list.- Parameters:
elements
- An iterable of replacementStrategyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
addAllReplacementStrategyHandlerFactories
public final ImmutableGPUEAExecutionContext.Builder<T> addAllReplacementStrategyHandlerFactories(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Adds elements toreplacementStrategyHandlerFactories
list.- Parameters:
elements
- An iterable of replacementStrategyHandlerFactories elements- Returns:
this
builder for use in a chained invocation
-
randomGenerator
public final ImmutableGPUEAExecutionContext.Builder<T> randomGenerator(RandomGenerator randomGenerator) Initializes the value for therandomGenerator
attribute.If not set, this attribute will have a default value as returned by the initializer of
randomGenerator
.- Parameters:
randomGenerator
- The value for randomGenerator- Returns:
this
builder for use in a chained invocation
-
populationSize
Initializes the value for thepopulationSize
attribute.If not set, this attribute will have a default value as returned by the initializer of
populationSize
.- Parameters:
populationSize
- The value for populationSize- Returns:
this
builder for use in a chained invocation
-
chromosomeFactoryProvider
public final ImmutableGPUEAExecutionContext.Builder<T> chromosomeFactoryProvider(ChromosomeFactoryProvider chromosomeFactoryProvider) Initializes the value for thechromosomeFactoryProvider
attribute.If not set, this attribute will have a default value as returned by the initializer of
chromosomeFactoryProvider
.- Parameters:
chromosomeFactoryProvider
- The value for chromosomeFactoryProvider- Returns:
this
builder for use in a chained invocation
-
addEvolutionListeners
public final ImmutableGPUEAExecutionContext.Builder<T> addEvolutionListeners(EvolutionListener<T> element) Adds one element toevolutionListeners
list.- Parameters:
element
- A evolutionListeners element- Returns:
this
builder for use in a chained invocation
-
addEvolutionListeners
@SafeVarargs public final ImmutableGPUEAExecutionContext.Builder<T> addEvolutionListeners(EvolutionListener<T>... elements) Adds elements toevolutionListeners
list.- Parameters:
elements
- An array of evolutionListeners elements- Returns:
this
builder for use in a chained invocation
-
evolutionListeners
public final ImmutableGPUEAExecutionContext.Builder<T> evolutionListeners(Iterable<? extends EvolutionListener<T>> elements) Sets or replaces all elements forevolutionListeners
list.- Parameters:
elements
- An iterable of evolutionListeners elements- Returns:
this
builder for use in a chained invocation
-
addAllEvolutionListeners
public final ImmutableGPUEAExecutionContext.Builder<T> addAllEvolutionListeners(Iterable<? extends EvolutionListener<T>> elements) Adds elements toevolutionListeners
list.- Parameters:
elements
- An iterable of evolutionListeners elements- Returns:
this
builder for use in a chained invocation
-
platformFilters
public final ImmutableGPUEAExecutionContext.Builder<T> platformFilters(Predicate<Platform> platformFilters) Initializes the value for theplatformFilters
attribute.If not set, this attribute will have a default value as returned by the initializer of
platformFilters
.- Parameters:
platformFilters
- The value for platformFilters- Returns:
this
builder for use in a chained invocation
-
deviceFilters
public final ImmutableGPUEAExecutionContext.Builder<T> deviceFilters(Predicate<Device> deviceFilters) Initializes the value for thedeviceFilters
attribute.If not set, this attribute will have a default value as returned by the initializer of
deviceFilters
.- Parameters:
deviceFilters
- The value for deviceFilters- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableGPUEAExecutionContext
.- Returns:
- An immutable instance of GPUEAExecutionContext
- Throws:
IllegalStateException
- if any required attributes are missing
-
defaultChromosomeCombinatorHandlersIsSet
private boolean defaultChromosomeCombinatorHandlersIsSet() -
defaultSelectionPolicyHandlersIsSet
private boolean defaultSelectionPolicyHandlersIsSet() -
defaultMutationPolicyHandlersIsSet
private boolean defaultMutationPolicyHandlersIsSet() -
defaultChromosomeMutationPolicyHandlersIsSet
private boolean defaultChromosomeMutationPolicyHandlersIsSet() -
defaultReplacementStrategyHandlersIsSet
private boolean defaultReplacementStrategyHandlersIsSet() -
populationSizeIsSet
private boolean populationSizeIsSet() -
evolutionListenersIsSet
private boolean evolutionListenersIsSet()
-