Class ImmutableProgramRandomMutate
java.lang.Object
net.bmahe.genetics4j.gp.spec.mutation.ImmutableProgramRandomMutate
- All Implemented Interfaces:
MutationPolicy
,ProgramRandomMutate
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableProgramRandomMutate
extends Object
implements ProgramRandomMutate
Immutable implementation of
ProgramRandomMutate
.
Use the builder to create immutable instances:
ImmutableProgramRandomMutate.builder()
.
Use the static factory method to create immutable instances:
ImmutableProgramRandomMutate.of()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableProgramRandomMutate
. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableProgramRandomMutate
(double populationMutationProbability) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableProgramRandomMutate
.static ImmutableProgramRandomMutate
copyOf
(ProgramRandomMutate instance) Creates an immutable copy of aProgramRandomMutate
value.boolean
This instance is equal to all instances ofImmutableProgramRandomMutate
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableProgramRandomMutate another) int
hashCode()
Computes a hash code from attributes:populationMutationProbability
.static ImmutableProgramRandomMutate
of
(double populationMutationProbability) Construct a new immutableProgramRandomMutate
instance.double
toString()
Prints the immutable valueProgramRandomMutate
with attribute values.private static ImmutableProgramRandomMutate
validate
(ImmutableProgramRandomMutate instance) withPopulationMutationProbability
(double value) Copy the current immutable object by setting a value for thepopulationMutationProbability
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.bmahe.genetics4j.gp.spec.mutation.ProgramRandomMutate
check
-
Field Details
-
populationMutationProbability
private final double populationMutationProbability
-
-
Constructor Details
-
ImmutableProgramRandomMutate
private ImmutableProgramRandomMutate(double populationMutationProbability)
-
-
Method Details
-
populationMutationProbability
public double populationMutationProbability()- Specified by:
populationMutationProbability
in interfaceProgramRandomMutate
- Returns:
- The value of the
populationMutationProbability
attribute
-
withPopulationMutationProbability
Copy the current immutable object by setting a value for thepopulationMutationProbability
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for populationMutationProbability- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableProgramRandomMutate
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:populationMutationProbability
. -
toString
Prints the immutable valueProgramRandomMutate
with attribute values. -
of
Construct a new immutableProgramRandomMutate
instance.- Parameters:
populationMutationProbability
- The value for thepopulationMutationProbability
attribute- Returns:
- An immutable ProgramRandomMutate instance
-
validate
-
copyOf
Creates an immutable copy of aProgramRandomMutate
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable ProgramRandomMutate instance
-
builder
Creates a builder forImmutableProgramRandomMutate
.ImmutableProgramRandomMutate.builder() .populationMutationProbability(double) // required
populationMutationProbability
.build();- Returns:
- A new ImmutableProgramRandomMutate builder
-