Package net.bmahe.genetics4j.gp.math
Class ImmutableCoefficientOperation.Builder<T>
java.lang.Object
net.bmahe.genetics4j.gp.math.ImmutableCoefficientOperation.Builder<T>
- Enclosing class:
ImmutableCoefficientOperation<T>
Builds instances of type
ImmutableCoefficientOperation
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutableCoefficientOperation
.private String
private void
from
(CoefficientOperation<T> instance) Fill a builder with attribute values from the providednet.bmahe.genetics4j.gp.math.CoefficientOperation
instance.Fill a builder with attribute values from the providednet.bmahe.genetics4j.gp.Operation
instance.Initializes the value for thename
attribute.prettyName
(String prettyName) Initializes the value for theprettyName
attribute.returnedType
(Class returnedType) Initializes the value for thereturnedType
attribute.Initializes the value for thevalue
attribute.
-
Field Details
-
INIT_BIT_NAME
private static final long INIT_BIT_NAME- See Also:
-
INIT_BIT_RETURNED_TYPE
private static final long INIT_BIT_RETURNED_TYPE- See Also:
-
INIT_BIT_VALUE
private static final long INIT_BIT_VALUE- See Also:
-
initBits
private long initBits -
name
-
returnedType
-
prettyName
-
value
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providednet.bmahe.genetics4j.gp.Operation
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providednet.bmahe.genetics4j.gp.math.CoefficientOperation
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
-
name
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
returnedType
Initializes the value for thereturnedType
attribute.- Parameters:
returnedType
- The value for returnedType- Returns:
this
builder for use in a chained invocation
-
prettyName
Initializes the value for theprettyName
attribute.If not set, this attribute will have a default value as returned by the initializer of
prettyName
.- Parameters:
prettyName
- The value for prettyName- Returns:
this
builder for use in a chained invocation
-
value
Initializes the value for thevalue
attribute.- Parameters:
value
- The value for value- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCoefficientOperation
.- Returns:
- An immutable instance of CoefficientOperation
- Throws:
IllegalStateException
- if any required attributes are missing
-
formatRequiredAttributesMessage
-