Class ImmutableDeleteNode
java.lang.Object
net.bmahe.genetics4j.neat.spec.mutation.DeleteNode
net.bmahe.genetics4j.neat.spec.mutation.ImmutableDeleteNode
- All Implemented Interfaces:
MutationPolicy
@Generated(from="DeleteNode",
generator="Immutables")
@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
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDeleteNode.Builderbuilder()Creates a builder forDeleteNode.static DeleteNodecopyOf(DeleteNode instance) Creates an immutable copy of aDeleteNodevalue.booleanThis instance is equal to all instances ofImmutableDeleteNodethat have equal attribute values.private booleanequalsByValue(ImmutableDeleteNode another) inthashCode()Computes a hash code from attributes:populationMutationProbability.static DeleteNodeof(double populationMutationProbability) Construct a new immutableDeleteNodeinstance.doubletoString()Prints the immutable valueDeleteNodewith attribute values.private static ImmutableDeleteNodevalidate(ImmutableDeleteNode instance) final ImmutableDeleteNodewithPopulationMutationProbability(double value) Copy the current immutable object by setting a value for thepopulationMutationProbabilityattribute.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:
populationMutationProbabilityin classDeleteNode- 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 ofImmutableDeleteNodethat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:populationMutationProbability. -
toString
Prints the immutable valueDeleteNodewith attribute values. -
of
Construct a new immutableDeleteNodeinstance.- Parameters:
populationMutationProbability- The value for thepopulationMutationProbabilityattribute- Returns:
- An immutable DeleteNode instance
-
validate
-
copyOf
Creates an immutable copy of aDeleteNodevalue. 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 forDeleteNode.ImmutableDeleteNode.builder() .populationMutationProbability(double) // requiredpopulationMutationProbability.build();- Returns:
- A new DeleteNode builder
-