Class ImmutableRandomSelection
java.lang.Object
net.bmahe.genetics4j.core.spec.selection.RandomSelection
net.bmahe.genetics4j.core.spec.selection.ImmutableRandomSelection
- All Implemented Interfaces:
SelectionPolicy
@Generated(from="RandomSelection",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableRandomSelection
extends RandomSelection
Immutable implementation of
RandomSelection.
Use the builder to create immutable instances:
ImmutableRandomSelection.builder().
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forRandomSelection.static RandomSelectioncopyOf(RandomSelection instance) Creates an immutable copy of aRandomSelectionvalue.booleanThis instance is equal to all instances ofImmutableRandomSelectionthat have equal attribute values.private booleanequalsByValue(ImmutableRandomSelection another) inthashCode()Returns a constant hash code value.toString()Prints the immutable valueRandomSelection.Methods inherited from class net.bmahe.genetics4j.core.spec.selection.RandomSelection
build
-
Constructor Details
-
ImmutableRandomSelection
-
-
Method Details
-
equals
This instance is equal to all instances ofImmutableRandomSelectionthat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Returns a constant hash code value. -
toString
Prints the immutable valueRandomSelection. -
copyOf
Creates an immutable copy of aRandomSelectionvalue. 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 RandomSelection instance
-
builder
Creates a builder forRandomSelection.ImmutableRandomSelection.builder() .build();- Returns:
- A new RandomSelection builder
-