Class ImmutableAddNode
java.lang.Object
net.bmahe.genetics4j.neat.spec.mutation.AddNode
net.bmahe.genetics4j.neat.spec.mutation.ImmutableAddNode
- All Implemented Interfaces:
MutationPolicy
@Generated(from="AddNode",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableAddNode
extends AddNode
Immutable implementation of
AddNode.
Use the builder to create immutable instances:
ImmutableAddNode.builder().
Use the static factory method to create immutable instances:
ImmutableAddNode.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAddNode.Builderbuilder()Creates a builder forAddNode.static AddNodeCreates an immutable copy of aAddNodevalue.booleanThis instance is equal to all instances ofImmutableAddNodethat have equal attribute values.private booleanequalsByValue(ImmutableAddNode another) inthashCode()Computes a hash code from attributes:populationMutationProbability.static AddNodeof(double populationMutationProbability) Construct a new immutableAddNodeinstance.doubletoString()Prints the immutable valueAddNodewith attribute values.private static ImmutableAddNodevalidate(ImmutableAddNode instance) final ImmutableAddNodewithPopulationMutationProbability(double value) Copy the current immutable object by setting a value for thepopulationMutationProbabilityattribute.
-
Field Details
-
populationMutationProbability
private final double populationMutationProbability
-
-
Constructor Details
-
ImmutableAddNode
private ImmutableAddNode(double populationMutationProbability)
-
-
Method Details
-
populationMutationProbability
public double populationMutationProbability()- Specified by:
populationMutationProbabilityin classAddNode- 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 ofImmutableAddNodethat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:populationMutationProbability. -
toString
Prints the immutable valueAddNodewith attribute values. -
of
Construct a new immutableAddNodeinstance.- Parameters:
populationMutationProbability- The value for thepopulationMutationProbabilityattribute- Returns:
- An immutable AddNode instance
-
validate
-
copyOf
Creates an immutable copy of aAddNodevalue. 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 AddNode instance
-
builder
Creates a builder forAddNode.ImmutableAddNode.builder() .populationMutationProbability(double) // requiredpopulationMutationProbability.build();- Returns:
- A new AddNode builder
-