Class ImmutableNodeReplacement
java.lang.Object
net.bmahe.genetics4j.gp.spec.mutation.ImmutableNodeReplacement
- All Implemented Interfaces:
MutationPolicy
,NodeReplacement
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableNodeReplacement
extends Object
implements NodeReplacement
Immutable implementation of
NodeReplacement
.
Use the builder to create immutable instances:
ImmutableNodeReplacement.builder()
.
Use the static factory method to create immutable instances:
ImmutableNodeReplacement.of()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableNodeReplacement
. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableNodeReplacement
(double populationMutationProbability) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableNodeReplacement
.static ImmutableNodeReplacement
copyOf
(NodeReplacement instance) Creates an immutable copy of aNodeReplacement
value.boolean
This instance is equal to all instances ofImmutableNodeReplacement
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableNodeReplacement another) int
hashCode()
Computes a hash code from attributes:populationMutationProbability
.static ImmutableNodeReplacement
of
(double populationMutationProbability) Construct a new immutableNodeReplacement
instance.double
toString()
Prints the immutable valueNodeReplacement
with attribute values.private static ImmutableNodeReplacement
validate
(ImmutableNodeReplacement instance) final ImmutableNodeReplacement
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.NodeReplacement
check
-
Field Details
-
populationMutationProbability
private final double populationMutationProbability
-
-
Constructor Details
-
ImmutableNodeReplacement
private ImmutableNodeReplacement(double populationMutationProbability)
-
-
Method Details
-
populationMutationProbability
public double populationMutationProbability()- Specified by:
populationMutationProbability
in interfaceNodeReplacement
- 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 ofImmutableNodeReplacement
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:populationMutationProbability
. -
toString
Prints the immutable valueNodeReplacement
with attribute values. -
of
Construct a new immutableNodeReplacement
instance.- Parameters:
populationMutationProbability
- The value for thepopulationMutationProbability
attribute- Returns:
- An immutable NodeReplacement instance
-
validate
-
copyOf
Creates an immutable copy of aNodeReplacement
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 NodeReplacement instance
-
builder
Creates a builder forImmutableNodeReplacement
.ImmutableNodeReplacement.builder() .populationMutationProbability(double) // required
populationMutationProbability
.build();- Returns:
- A new ImmutableNodeReplacement builder
-