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