Package net.bmahe.genetics4j.core.spec
Class ImmutableEAExecutionContext.Builder<T extends Comparable<T>>
java.lang.Object
net.bmahe.genetics4j.core.spec.ImmutableEAExecutionContext.Builder<T>
- Enclosing class:
ImmutableEAExecutionContext<T extends Comparable<T>>
public static final class ImmutableEAExecutionContext.Builder<T extends Comparable<T>>
extends Object
Builds instances of type
ImmutableEAExecutionContext
.
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 int
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 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 newImmutableEAExecutionContext
.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
evolutionListeners
(Iterable<? extends EvolutionListener<T>> elements) Sets or replaces all elements forevolutionListeners
list.private boolean
from
(EAExecutionContext<T> instance) Fill a builder with attribute values from the providedEAExecutionContext
instance.mutationPolicyHandlerFactories
(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Sets or replaces all elements formutationPolicyHandlerFactories
list.numberOfPartitions
(int numberOfPartitions) Initializes the value for thenumberOfPartitions
attribute.private boolean
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:
-
OPT_BIT_NUMBER_OF_PARTITIONS
private static final long OPT_BIT_NUMBER_OF_PARTITIONS- 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
-
numberOfPartitions
private int numberOfPartitions
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedEAExecutionContext
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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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 ImmutableEAExecutionContext.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
-
numberOfPartitions
Initializes the value for thenumberOfPartitions
attribute.If not set, this attribute will have a default value as returned by the initializer of
numberOfPartitions
.- Parameters:
numberOfPartitions
- The value for numberOfPartitions- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableEAExecutionContext
.- Returns:
- An immutable instance of EAExecutionContext
- 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() -
numberOfPartitionsIsSet
private boolean numberOfPartitionsIsSet()
-