Class ImmutableRouletteWheel

java.lang.Object
net.bmahe.genetics4j.core.spec.selection.RouletteWheel
net.bmahe.genetics4j.core.spec.selection.ImmutableRouletteWheel
All Implemented Interfaces:
SelectionPolicy

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableRouletteWheel extends RouletteWheel
Immutable implementation of RouletteWheel.

Use the builder to create immutable instances: ImmutableRouletteWheel.builder().

  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableRouletteWheel 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, ImmutableRouletteWheel another)
    • hashCode

      public int hashCode()
      Returns a constant hash code value.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value RouletteWheel.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableRouletteWheel copyOf(RouletteWheel instance)
      Creates an immutable copy of a RouletteWheel 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 RouletteWheel instance
    • builder

      public static ImmutableRouletteWheel.Builder builder()
      Creates a builder for ImmutableRouletteWheel.
       ImmutableRouletteWheel.builder()
          .build();
       
      Returns:
      A new ImmutableRouletteWheel builder