Class ImmutableProgramRandomMutate
java.lang.Object
net.bmahe.genetics4j.gp.spec.mutation.ImmutableProgramRandomMutate
- All Implemented Interfaces:
MutationPolicy,ProgramRandomMutate
@Generated(from="ProgramRandomMutate",
generator="Immutables")
@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
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeProgramRandomMutate. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableProgramRandomMutate(double populationMutationProbability) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forProgramRandomMutate.static ProgramRandomMutatecopyOf(ProgramRandomMutate instance) Creates an immutable copy of aProgramRandomMutatevalue.booleanThis instance is equal to all instances ofImmutableProgramRandomMutatethat have equal attribute values.private booleaninthashCode()Computes a hash code from attributes:populationMutationProbability.static ProgramRandomMutateof(double populationMutationProbability) Construct a new immutableProgramRandomMutateinstance.doubletoString()Prints the immutable valueProgramRandomMutatewith attribute values.private static ImmutableProgramRandomMutatevalidate(ImmutableProgramRandomMutate instance) withPopulationMutationProbability(double value) Copy the current immutable object by setting a value for thepopulationMutationProbabilityattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
populationMutationProbabilityin interfaceProgramRandomMutate- Returns:
- The value of the
populationMutationProbabilityattribute
-
withPopulationMutationProbability
Copy the current immutable object by setting a value for thepopulationMutationProbabilityattribute. 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 or the
thisobject
-
equals
This instance is equal to all instances ofImmutableProgramRandomMutatethat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:populationMutationProbability. -
toString
Prints the immutable valueProgramRandomMutatewith attribute values. -
of
Construct a new immutableProgramRandomMutateinstance.- Parameters:
populationMutationProbability- The value for thepopulationMutationProbabilityattribute- Returns:
- An immutable ProgramRandomMutate instance
-
validate
-
copyOf
Creates an immutable copy of aProgramRandomMutatevalue. 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 forProgramRandomMutate.ImmutableProgramRandomMutate.builder() .populationMutationProbability(double) // requiredpopulationMutationProbability.build();- Returns:
- A new ProgramRandomMutate builder
-