Class ImmutableDeleteNode
java.lang.Object
net.bmahe.genetics4j.neat.spec.mutation.DeleteNode
net.bmahe.genetics4j.neat.spec.mutation.ImmutableDeleteNode
- All Implemented Interfaces:
MutationPolicy
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableDeleteNode
extends DeleteNode
Immutable implementation of
DeleteNode
.
Use the builder to create immutable instances:
ImmutableDeleteNode.builder()
.
Use the static factory method to create immutable instances:
ImmutableDeleteNode.of()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDeleteNode
. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDeleteNode.Builder
builder()
Creates a builder forImmutableDeleteNode
.static ImmutableDeleteNode
copyOf
(DeleteNode instance) Creates an immutable copy of aDeleteNode
value.boolean
This instance is equal to all instances ofImmutableDeleteNode
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableDeleteNode another) int
hashCode()
Computes a hash code from attributes:populationMutationProbability
.static ImmutableDeleteNode
of
(double populationMutationProbability) Construct a new immutableDeleteNode
instance.double
toString()
Prints the immutable valueDeleteNode
with attribute values.private static ImmutableDeleteNode
validate
(ImmutableDeleteNode instance) final ImmutableDeleteNode
withPopulationMutationProbability
(double value) Copy the current immutable object by setting a value for thepopulationMutationProbability
attribute.Methods inherited from class net.bmahe.genetics4j.neat.spec.mutation.DeleteNode
check
-
Field Details
-
populationMutationProbability
private final double populationMutationProbability
-
-
Constructor Details
-
ImmutableDeleteNode
private ImmutableDeleteNode(double populationMutationProbability)
-
-
Method Details
-
populationMutationProbability
public double populationMutationProbability()- Specified by:
populationMutationProbability
in classDeleteNode
- 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 ofImmutableDeleteNode
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:populationMutationProbability
. -
toString
Prints the immutable valueDeleteNode
with attribute values. -
of
Construct a new immutableDeleteNode
instance.- Parameters:
populationMutationProbability
- The value for thepopulationMutationProbability
attribute- Returns:
- An immutable DeleteNode instance
-
validate
-
copyOf
Creates an immutable copy of aDeleteNode
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 DeleteNode instance
-
builder
Creates a builder forImmutableDeleteNode
.ImmutableDeleteNode.builder() .populationMutationProbability(double) // required
populationMutationProbability
.build();- Returns:
- A new ImmutableDeleteNode builder
-