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>>
@Generated(from="EAExecutionContext",
generator="Immutables")
public static final class ImmutableEAExecutionContext.Builder<T extends Comparable<T>>
extends Object
Builds instances of type
EAExecutionContext.
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
FieldsModifier and TypeFieldDescriptionprivate List<ChromosomeCombinatorHandlerFactory<T>> private ChromosomeFactoryProviderprivate 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 intprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate static final longprivate longprivate intprivate RandomGeneratorprivate List<ReplacementStrategyHandlerFactory<T>> private List<SelectionPolicyHandlerFactory<T>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllChromosomeCombinatorHandlerFactories(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Adds elements tochromosomeCombinatorHandlerFactorieslist.addAllChromosomeMutationPolicyHandlerFactories(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Adds elements tochromosomeMutationPolicyHandlerFactorieslist.addAllDefaultChromosomeCombinatorHandlers(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Adds elements todefaultChromosomeCombinatorHandlerslist.addAllDefaultChromosomeMutationPolicyHandlers(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Adds elements todefaultChromosomeMutationPolicyHandlerslist.addAllDefaultMutationPolicyHandlers(Iterable<? extends MutationPolicyHandler<T>> elements) Adds elements todefaultMutationPolicyHandlerslist.addAllDefaultReplacementStrategyHandlers(Iterable<? extends ReplacementStrategyHandler<T>> elements) Adds elements todefaultReplacementStrategyHandlerslist.addAllDefaultSelectionPolicyHandlers(Iterable<? extends SelectionPolicyHandler<T>> elements) Adds elements todefaultSelectionPolicyHandlerslist.addAllEvolutionListeners(Iterable<? extends EvolutionListener<T>> elements) Adds elements toevolutionListenerslist.addAllMutationPolicyHandlerFactories(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Adds elements tomutationPolicyHandlerFactorieslist.addAllReplacementStrategyHandlerFactories(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Adds elements toreplacementStrategyHandlerFactorieslist.addAllSelectionPolicyHandlerFactories(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Adds elements toselectionPolicyHandlerFactorieslist.Adds one element tochromosomeCombinatorHandlerFactorieslist.Adds elements tochromosomeCombinatorHandlerFactorieslist.Adds one element tochromosomeMutationPolicyHandlerFactorieslist.Adds elements tochromosomeMutationPolicyHandlerFactorieslist.Adds one element todefaultChromosomeCombinatorHandlerslist.Adds elements todefaultChromosomeCombinatorHandlerslist.addDefaultChromosomeMutationPolicyHandlers(ChromosomeMutationHandler<? extends Chromosome> element) Adds one element todefaultChromosomeMutationPolicyHandlerslist.addDefaultChromosomeMutationPolicyHandlers(ChromosomeMutationHandler<? extends Chromosome>... elements) Adds elements todefaultChromosomeMutationPolicyHandlerslist.Adds one element todefaultMutationPolicyHandlerslist.addDefaultMutationPolicyHandlers(MutationPolicyHandler<T>... elements) Adds elements todefaultMutationPolicyHandlerslist.Adds one element todefaultReplacementStrategyHandlerslist.addDefaultReplacementStrategyHandlers(ReplacementStrategyHandler<T>... elements) Adds elements todefaultReplacementStrategyHandlerslist.Adds one element todefaultSelectionPolicyHandlerslist.addDefaultSelectionPolicyHandlers(SelectionPolicyHandler<T>... elements) Adds elements todefaultSelectionPolicyHandlerslist.addEvolutionListeners(EvolutionListener<T> element) Adds one element toevolutionListenerslist.addEvolutionListeners(EvolutionListener<T>... elements) Adds elements toevolutionListenerslist.Adds one element tomutationPolicyHandlerFactorieslist.addMutationPolicyHandlerFactories(MutationPolicyHandlerFactory<T>... elements) Adds elements tomutationPolicyHandlerFactorieslist.Adds one element toreplacementStrategyHandlerFactorieslist.Adds elements toreplacementStrategyHandlerFactorieslist.Adds one element toselectionPolicyHandlerFactorieslist.addSelectionPolicyHandlerFactories(SelectionPolicyHandlerFactory<T>... elements) Adds elements toselectionPolicyHandlerFactorieslist.build()Builds a newEAExecutionContext.chromosomeCombinatorHandlerFactories(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeCombinatorHandlerFactorieslist.chromosomeFactoryProvider(ChromosomeFactoryProvider chromosomeFactoryProvider) Initializes the value for thechromosomeFactoryProviderattribute.chromosomeMutationPolicyHandlerFactories(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeMutationPolicyHandlerFactorieslist.defaultChromosomeCombinatorHandlers(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Sets or replaces all elements fordefaultChromosomeCombinatorHandlerslist.private booleandefaultChromosomeMutationPolicyHandlers(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Sets or replaces all elements fordefaultChromosomeMutationPolicyHandlerslist.private booleandefaultMutationPolicyHandlers(Iterable<? extends MutationPolicyHandler<T>> elements) Sets or replaces all elements fordefaultMutationPolicyHandlerslist.private booleandefaultReplacementStrategyHandlers(Iterable<? extends ReplacementStrategyHandler<T>> elements) Sets or replaces all elements fordefaultReplacementStrategyHandlerslist.private booleandefaultSelectionPolicyHandlers(Iterable<? extends SelectionPolicyHandler<T>> elements) Sets or replaces all elements fordefaultSelectionPolicyHandlerslist.private booleanevolutionListeners(Iterable<? extends EvolutionListener<T>> elements) Sets or replaces all elements forevolutionListenerslist.private booleanfrom(EAExecutionContext<T> instance) Fill a builder with attribute values from the providedEAExecutionContextinstance.mutationPolicyHandlerFactories(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Sets or replaces all elements formutationPolicyHandlerFactorieslist.numberOfPartitions(int numberOfPartitions) Initializes the value for thenumberOfPartitionsattribute.private booleanpopulationSize(int populationSize) Initializes the value for thepopulationSizeattribute.private booleanrandomGenerator(RandomGenerator randomGenerator) Initializes the value for therandomGeneratorattribute.replacementStrategyHandlerFactories(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Sets or replaces all elements forreplacementStrategyHandlerFactorieslist.selectionPolicyHandlerFactories(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Sets or replaces all elements forselectionPolicyHandlerFactorieslist.
-
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 providedEAExecutionContextinstance. 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:
thisbuilder for use in a chained invocation
-
addDefaultChromosomeCombinatorHandlers
public final ImmutableEAExecutionContext.Builder<T> addDefaultChromosomeCombinatorHandlers(ChromosomeCombinatorHandler<T> element) Adds one element todefaultChromosomeCombinatorHandlerslist.- Parameters:
element- A defaultChromosomeCombinatorHandlers element- Returns:
thisbuilder for use in a chained invocation
-
addDefaultChromosomeCombinatorHandlers
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addDefaultChromosomeCombinatorHandlers(ChromosomeCombinatorHandler<T>... elements) Adds elements todefaultChromosomeCombinatorHandlerslist.- Parameters:
elements- An array of defaultChromosomeCombinatorHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
defaultChromosomeCombinatorHandlers
public final ImmutableEAExecutionContext.Builder<T> defaultChromosomeCombinatorHandlers(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Sets or replaces all elements fordefaultChromosomeCombinatorHandlerslist.- Parameters:
elements- An iterable of defaultChromosomeCombinatorHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDefaultChromosomeCombinatorHandlers
public final ImmutableEAExecutionContext.Builder<T> addAllDefaultChromosomeCombinatorHandlers(Iterable<? extends ChromosomeCombinatorHandler<T>> elements) Adds elements todefaultChromosomeCombinatorHandlerslist.- Parameters:
elements- An iterable of defaultChromosomeCombinatorHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addChromosomeCombinatorHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addChromosomeCombinatorHandlerFactories(ChromosomeCombinatorHandlerFactory<T> element) Adds one element tochromosomeCombinatorHandlerFactorieslist.- Parameters:
element- A chromosomeCombinatorHandlerFactories element- Returns:
thisbuilder for use in a chained invocation
-
addChromosomeCombinatorHandlerFactories
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addChromosomeCombinatorHandlerFactories(ChromosomeCombinatorHandlerFactory<T>... elements) Adds elements tochromosomeCombinatorHandlerFactorieslist.- Parameters:
elements- An array of chromosomeCombinatorHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
chromosomeCombinatorHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> chromosomeCombinatorHandlerFactories(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeCombinatorHandlerFactorieslist.- Parameters:
elements- An iterable of chromosomeCombinatorHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addAllChromosomeCombinatorHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addAllChromosomeCombinatorHandlerFactories(Iterable<? extends ChromosomeCombinatorHandlerFactory<T>> elements) Adds elements tochromosomeCombinatorHandlerFactorieslist.- Parameters:
elements- An iterable of chromosomeCombinatorHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addDefaultSelectionPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> addDefaultSelectionPolicyHandlers(SelectionPolicyHandler<T> element) Adds one element todefaultSelectionPolicyHandlerslist.- Parameters:
element- A defaultSelectionPolicyHandlers element- Returns:
thisbuilder for use in a chained invocation
-
addDefaultSelectionPolicyHandlers
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addDefaultSelectionPolicyHandlers(SelectionPolicyHandler<T>... elements) Adds elements todefaultSelectionPolicyHandlerslist.- Parameters:
elements- An array of defaultSelectionPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
defaultSelectionPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> defaultSelectionPolicyHandlers(Iterable<? extends SelectionPolicyHandler<T>> elements) Sets or replaces all elements fordefaultSelectionPolicyHandlerslist.- Parameters:
elements- An iterable of defaultSelectionPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDefaultSelectionPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> addAllDefaultSelectionPolicyHandlers(Iterable<? extends SelectionPolicyHandler<T>> elements) Adds elements todefaultSelectionPolicyHandlerslist.- Parameters:
elements- An iterable of defaultSelectionPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addSelectionPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addSelectionPolicyHandlerFactories(SelectionPolicyHandlerFactory<T> element) Adds one element toselectionPolicyHandlerFactorieslist.- Parameters:
element- A selectionPolicyHandlerFactories element- Returns:
thisbuilder for use in a chained invocation
-
addSelectionPolicyHandlerFactories
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addSelectionPolicyHandlerFactories(SelectionPolicyHandlerFactory<T>... elements) Adds elements toselectionPolicyHandlerFactorieslist.- Parameters:
elements- An array of selectionPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
selectionPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> selectionPolicyHandlerFactories(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Sets or replaces all elements forselectionPolicyHandlerFactorieslist.- Parameters:
elements- An iterable of selectionPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSelectionPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addAllSelectionPolicyHandlerFactories(Iterable<? extends SelectionPolicyHandlerFactory<T>> elements) Adds elements toselectionPolicyHandlerFactorieslist.- Parameters:
elements- An iterable of selectionPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addDefaultMutationPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> addDefaultMutationPolicyHandlers(MutationPolicyHandler<T> element) Adds one element todefaultMutationPolicyHandlerslist.- Parameters:
element- A defaultMutationPolicyHandlers element- Returns:
thisbuilder for use in a chained invocation
-
addDefaultMutationPolicyHandlers
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addDefaultMutationPolicyHandlers(MutationPolicyHandler<T>... elements) Adds elements todefaultMutationPolicyHandlerslist.- Parameters:
elements- An array of defaultMutationPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
defaultMutationPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> defaultMutationPolicyHandlers(Iterable<? extends MutationPolicyHandler<T>> elements) Sets or replaces all elements fordefaultMutationPolicyHandlerslist.- Parameters:
elements- An iterable of defaultMutationPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDefaultMutationPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> addAllDefaultMutationPolicyHandlers(Iterable<? extends MutationPolicyHandler<T>> elements) Adds elements todefaultMutationPolicyHandlerslist.- Parameters:
elements- An iterable of defaultMutationPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addMutationPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addMutationPolicyHandlerFactories(MutationPolicyHandlerFactory<T> element) Adds one element tomutationPolicyHandlerFactorieslist.- Parameters:
element- A mutationPolicyHandlerFactories element- Returns:
thisbuilder for use in a chained invocation
-
addMutationPolicyHandlerFactories
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addMutationPolicyHandlerFactories(MutationPolicyHandlerFactory<T>... elements) Adds elements tomutationPolicyHandlerFactorieslist.- Parameters:
elements- An array of mutationPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
mutationPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> mutationPolicyHandlerFactories(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Sets or replaces all elements formutationPolicyHandlerFactorieslist.- Parameters:
elements- An iterable of mutationPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMutationPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addAllMutationPolicyHandlerFactories(Iterable<? extends MutationPolicyHandlerFactory<T>> elements) Adds elements tomutationPolicyHandlerFactorieslist.- Parameters:
elements- An iterable of mutationPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addDefaultChromosomeMutationPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> addDefaultChromosomeMutationPolicyHandlers(ChromosomeMutationHandler<? extends Chromosome> element) Adds one element todefaultChromosomeMutationPolicyHandlerslist.- Parameters:
element- A defaultChromosomeMutationPolicyHandlers element- Returns:
thisbuilder for use in a chained invocation
-
addDefaultChromosomeMutationPolicyHandlers
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addDefaultChromosomeMutationPolicyHandlers(ChromosomeMutationHandler<? extends Chromosome>... elements) Adds elements todefaultChromosomeMutationPolicyHandlerslist.- Parameters:
elements- An array of defaultChromosomeMutationPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
defaultChromosomeMutationPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> defaultChromosomeMutationPolicyHandlers(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Sets or replaces all elements fordefaultChromosomeMutationPolicyHandlerslist.- Parameters:
elements- An iterable of defaultChromosomeMutationPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDefaultChromosomeMutationPolicyHandlers
public final ImmutableEAExecutionContext.Builder<T> addAllDefaultChromosomeMutationPolicyHandlers(Iterable<? extends ChromosomeMutationHandler<? extends Chromosome>> elements) Adds elements todefaultChromosomeMutationPolicyHandlerslist.- Parameters:
elements- An iterable of defaultChromosomeMutationPolicyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addChromosomeMutationPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addChromosomeMutationPolicyHandlerFactories(ChromosomeMutationHandlerFactory<T> element) Adds one element tochromosomeMutationPolicyHandlerFactorieslist.- Parameters:
element- A chromosomeMutationPolicyHandlerFactories element- Returns:
thisbuilder for use in a chained invocation
-
addChromosomeMutationPolicyHandlerFactories
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addChromosomeMutationPolicyHandlerFactories(ChromosomeMutationHandlerFactory<T>... elements) Adds elements tochromosomeMutationPolicyHandlerFactorieslist.- Parameters:
elements- An array of chromosomeMutationPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
chromosomeMutationPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> chromosomeMutationPolicyHandlerFactories(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Sets or replaces all elements forchromosomeMutationPolicyHandlerFactorieslist.- Parameters:
elements- An iterable of chromosomeMutationPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addAllChromosomeMutationPolicyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addAllChromosomeMutationPolicyHandlerFactories(Iterable<? extends ChromosomeMutationHandlerFactory<T>> elements) Adds elements tochromosomeMutationPolicyHandlerFactorieslist.- Parameters:
elements- An iterable of chromosomeMutationPolicyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addDefaultReplacementStrategyHandlers
public final ImmutableEAExecutionContext.Builder<T> addDefaultReplacementStrategyHandlers(ReplacementStrategyHandler<T> element) Adds one element todefaultReplacementStrategyHandlerslist.- Parameters:
element- A defaultReplacementStrategyHandlers element- Returns:
thisbuilder for use in a chained invocation
-
addDefaultReplacementStrategyHandlers
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addDefaultReplacementStrategyHandlers(ReplacementStrategyHandler<T>... elements) Adds elements todefaultReplacementStrategyHandlerslist.- Parameters:
elements- An array of defaultReplacementStrategyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
defaultReplacementStrategyHandlers
public final ImmutableEAExecutionContext.Builder<T> defaultReplacementStrategyHandlers(Iterable<? extends ReplacementStrategyHandler<T>> elements) Sets or replaces all elements fordefaultReplacementStrategyHandlerslist.- Parameters:
elements- An iterable of defaultReplacementStrategyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDefaultReplacementStrategyHandlers
public final ImmutableEAExecutionContext.Builder<T> addAllDefaultReplacementStrategyHandlers(Iterable<? extends ReplacementStrategyHandler<T>> elements) Adds elements todefaultReplacementStrategyHandlerslist.- Parameters:
elements- An iterable of defaultReplacementStrategyHandlers elements- Returns:
thisbuilder for use in a chained invocation
-
addReplacementStrategyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addReplacementStrategyHandlerFactories(ReplacementStrategyHandlerFactory<T> element) Adds one element toreplacementStrategyHandlerFactorieslist.- Parameters:
element- A replacementStrategyHandlerFactories element- Returns:
thisbuilder for use in a chained invocation
-
addReplacementStrategyHandlerFactories
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addReplacementStrategyHandlerFactories(ReplacementStrategyHandlerFactory<T>... elements) Adds elements toreplacementStrategyHandlerFactorieslist.- Parameters:
elements- An array of replacementStrategyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
replacementStrategyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> replacementStrategyHandlerFactories(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Sets or replaces all elements forreplacementStrategyHandlerFactorieslist.- Parameters:
elements- An iterable of replacementStrategyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
addAllReplacementStrategyHandlerFactories
public final ImmutableEAExecutionContext.Builder<T> addAllReplacementStrategyHandlerFactories(Iterable<? extends ReplacementStrategyHandlerFactory<T>> elements) Adds elements toreplacementStrategyHandlerFactorieslist.- Parameters:
elements- An iterable of replacementStrategyHandlerFactories elements- Returns:
thisbuilder for use in a chained invocation
-
randomGenerator
public final ImmutableEAExecutionContext.Builder<T> randomGenerator(RandomGenerator randomGenerator) Initializes the value for therandomGeneratorattribute.If not set, this attribute will have a default value as returned by the initializer of
randomGenerator.- Parameters:
randomGenerator- The value for randomGenerator- Returns:
thisbuilder for use in a chained invocation
-
populationSize
Initializes the value for thepopulationSizeattribute.If not set, this attribute will have a default value as returned by the initializer of
populationSize.- Parameters:
populationSize- The value for populationSize- Returns:
thisbuilder for use in a chained invocation
-
chromosomeFactoryProvider
public final ImmutableEAExecutionContext.Builder<T> chromosomeFactoryProvider(ChromosomeFactoryProvider chromosomeFactoryProvider) Initializes the value for thechromosomeFactoryProviderattribute.If not set, this attribute will have a default value as returned by the initializer of
chromosomeFactoryProvider.- Parameters:
chromosomeFactoryProvider- The value for chromosomeFactoryProvider- Returns:
thisbuilder for use in a chained invocation
-
addEvolutionListeners
public final ImmutableEAExecutionContext.Builder<T> addEvolutionListeners(EvolutionListener<T> element) Adds one element toevolutionListenerslist.- Parameters:
element- A evolutionListeners element- Returns:
thisbuilder for use in a chained invocation
-
addEvolutionListeners
@SafeVarargs public final ImmutableEAExecutionContext.Builder<T> addEvolutionListeners(EvolutionListener<T>... elements) Adds elements toevolutionListenerslist.- Parameters:
elements- An array of evolutionListeners elements- Returns:
thisbuilder for use in a chained invocation
-
evolutionListeners
public final ImmutableEAExecutionContext.Builder<T> evolutionListeners(Iterable<? extends EvolutionListener<T>> elements) Sets or replaces all elements forevolutionListenerslist.- Parameters:
elements- An iterable of evolutionListeners elements- Returns:
thisbuilder for use in a chained invocation
-
addAllEvolutionListeners
public final ImmutableEAExecutionContext.Builder<T> addAllEvolutionListeners(Iterable<? extends EvolutionListener<T>> elements) Adds elements toevolutionListenerslist.- Parameters:
elements- An iterable of evolutionListeners elements- Returns:
thisbuilder for use in a chained invocation
-
numberOfPartitions
Initializes the value for thenumberOfPartitionsattribute.If not set, this attribute will have a default value as returned by the initializer of
numberOfPartitions.- Parameters:
numberOfPartitions- The value for numberOfPartitions- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newEAExecutionContext.- 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()
-