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 class
Builds instances of typeImmutableSinglePointArithmetic
. -
Field Summary
FieldsFields inherited from class net.bmahe.genetics4j.core.spec.combination.SinglePointArithmetic
DEFAULT_ALPHA
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
alpha()
builder()
Creates a builder forImmutableSinglePointArithmetic
.copyOf
(SinglePointArithmetic instance) Creates an immutable copy of aSinglePointArithmetic
value.boolean
This instance is equal to all instances ofImmutableSinglePointArithmetic
that have equal attribute values.private boolean
int
hashCode()
Computes a hash code from attributes:alpha
.of
(double alpha) Construct a new immutableSinglePointArithmetic
instance.toString()
Prints the immutable valueSinglePointArithmetic
with attribute values.withAlpha
(double value) Copy the current immutable object by setting a value for thealpha
attribute.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:
alpha
in classSinglePointArithmetic
- Returns:
- The value of the
alpha
attribute
-
withAlpha
Copy the current immutable object by setting a value for thealpha
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableSinglePointArithmetic
that have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:alpha
. -
toString
Prints the immutable valueSinglePointArithmetic
with attribute values. -
of
Construct a new immutableSinglePointArithmetic
instance.- Parameters:
alpha
- The value for thealpha
attribute- Returns:
- An immutable SinglePointArithmetic instance
-
copyOf
Creates an immutable copy of aSinglePointArithmetic
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 SinglePointArithmetic instance
-
builder
Creates a builder forImmutableSinglePointArithmetic
.ImmutableSinglePointArithmetic.builder() .alpha(double) // optional
alpha
.build();- Returns:
- A new ImmutableSinglePointArithmetic builder
-