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().

  • Field Details

    • populationMutationProbability

      private final double populationMutationProbability
  • Constructor Details

    • ImmutableDeleteConnection

      private ImmutableDeleteConnection(double populationMutationProbability)
  • Method Details

    • populationMutationProbability

      public double populationMutationProbability()
      Specified by:
      populationMutationProbability in class DeleteConnection
      Returns:
      The value of the populationMutationProbability attribute
    • withPopulationMutationProbability

      public final ImmutableDeleteConnection withPopulationMutationProbability(double value)
      Copy the current immutable object by setting a value for the populationMutationProbability attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for populationMutationProbability
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableDeleteConnection that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableDeleteConnection another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: populationMutationProbability.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DeleteConnection with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableDeleteConnection of(double populationMutationProbability)
      Construct a new immutable DeleteConnection instance.
      Parameters:
      populationMutationProbability - The value for the populationMutationProbability attribute
      Returns:
      An immutable DeleteConnection instance
    • validate

      private static ImmutableDeleteConnection validate(ImmutableDeleteConnection instance)
    • copyOf

      public static ImmutableDeleteConnection copyOf(DeleteConnection instance)
      Creates an immutable copy of a DeleteConnection 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

      public static ImmutableDeleteConnection.Builder builder()
      Creates a builder for ImmutableDeleteConnection.
       ImmutableDeleteConnection.builder()
          .populationMutationProbability(double) // required populationMutationProbability
          .build();
       
      Returns:
      A new ImmutableDeleteConnection builder