Class ImmutableAddConnection
java.lang.Object
net.bmahe.genetics4j.neat.spec.mutation.AddConnection
net.bmahe.genetics4j.neat.spec.mutation.ImmutableAddConnection
- All Implemented Interfaces:
MutationPolicy
@Generated(from="AddConnection",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableAddConnection
extends AddConnection
Immutable implementation of
AddConnection.
Use the builder to create immutable instances:
ImmutableAddConnection.builder().
Use the static factory method to create immutable instances:
ImmutableAddConnection.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableAddConnection(double populationMutationProbability) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forAddConnection.static AddConnectioncopyOf(AddConnection instance) Creates an immutable copy of aAddConnectionvalue.booleanThis instance is equal to all instances ofImmutableAddConnectionthat have equal attribute values.private booleanequalsByValue(ImmutableAddConnection another) inthashCode()Computes a hash code from attributes:populationMutationProbability.static AddConnectionof(double populationMutationProbability) Construct a new immutableAddConnectioninstance.doubletoString()Prints the immutable valueAddConnectionwith attribute values.private static ImmutableAddConnectionvalidate(ImmutableAddConnection instance) final ImmutableAddConnectionwithPopulationMutationProbability(double value) Copy the current immutable object by setting a value for thepopulationMutationProbabilityattribute.Methods inherited from class net.bmahe.genetics4j.neat.spec.mutation.AddConnection
check
-
Field Details
-
populationMutationProbability
private final double populationMutationProbability
-
-
Constructor Details
-
ImmutableAddConnection
private ImmutableAddConnection(double populationMutationProbability)
-
-
Method Details
-
populationMutationProbability
public double populationMutationProbability()- Specified by:
populationMutationProbabilityin classAddConnection- 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 ofImmutableAddConnectionthat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:populationMutationProbability. -
toString
Prints the immutable valueAddConnectionwith attribute values. -
of
Construct a new immutableAddConnectioninstance.- Parameters:
populationMutationProbability- The value for thepopulationMutationProbabilityattribute- Returns:
- An immutable AddConnection instance
-
validate
-
copyOf
Creates an immutable copy of aAddConnectionvalue. 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 AddConnection instance
-
builder
Creates a builder forAddConnection.ImmutableAddConnection.builder() .populationMutationProbability(double) // requiredpopulationMutationProbability.build();- Returns:
- A new AddConnection builder
-