Class ImmutableSinglePointArithmetic
java.lang.Object
net.bmahe.genetics4j.core.spec.combination.SinglePointArithmetic
net.bmahe.genetics4j.core.spec.combination.ImmutableSinglePointArithmetic
- All Implemented Interfaces:
CombinationPolicy
@Generated(from="SinglePointArithmetic",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableSinglePointArithmetic
extends SinglePointArithmetic
Immutable implementation of
SinglePointArithmetic.
Use the builder to create immutable instances:
ImmutableSinglePointArithmetic.builder().
Use the static factory method to create immutable instances:
ImmutableSinglePointArithmetic.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeSinglePointArithmetic. -
Field Summary
FieldsFields inherited from class net.bmahe.genetics4j.core.spec.combination.SinglePointArithmetic
DEFAULT_ALPHA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublealpha()builder()Creates a builder forSinglePointArithmetic.static SinglePointArithmeticcopyOf(SinglePointArithmetic instance) Creates an immutable copy of aSinglePointArithmeticvalue.booleanThis instance is equal to all instances ofImmutableSinglePointArithmeticthat have equal attribute values.private booleaninthashCode()Computes a hash code from attributes:alpha.static SinglePointArithmeticof(double alpha) Construct a new immutableSinglePointArithmeticinstance.toString()Prints the immutable valueSinglePointArithmeticwith attribute values.withAlpha(double value) Copy the current immutable object by setting a value for thealphaattribute.Methods inherited from class net.bmahe.genetics4j.core.spec.combination.SinglePointArithmetic
build
-
Field Details
-
alpha
private final double alpha
-
-
Constructor Details
-
ImmutableSinglePointArithmetic
-
ImmutableSinglePointArithmetic
private ImmutableSinglePointArithmetic(double alpha)
-
-
Method Details
-
alpha
public double alpha()- Overrides:
alphain classSinglePointArithmetic- Returns:
- The value of the
alphaattribute
-
withAlpha
Copy the current immutable object by setting a value for thealphaattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for alpha- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableSinglePointArithmeticthat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:alpha. -
toString
Prints the immutable valueSinglePointArithmeticwith attribute values. -
of
Construct a new immutableSinglePointArithmeticinstance.- Parameters:
alpha- The value for thealphaattribute- Returns:
- An immutable SinglePointArithmetic instance
-
copyOf
Creates an immutable copy of aSinglePointArithmeticvalue. 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 SinglePointArithmetic instance
-
builder
Creates a builder forSinglePointArithmetic.ImmutableSinglePointArithmetic.builder() .alpha(double) // optionalalpha.build();- Returns:
- A new SinglePointArithmetic builder
-