Package net.bmahe.genetics4j.gp
Class ImmutableOperation.Builder<T>
java.lang.Object
net.bmahe.genetics4j.gp.ImmutableOperation.Builder<T>
- Enclosing class:
ImmutableOperation<T>
@Generated(from="Operation",
generator="Immutables")
public static final class ImmutableOperation.Builder<T>
extends Object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ImmutableOperation.Builder<T> acceptedTypes(Iterable<? extends Class> elements) Sets or replaces all elements foracceptedTypeslist.final ImmutableOperation.Builder<T> addAcceptedTypes(Class element) Adds one element toacceptedTypeslist.final ImmutableOperation.Builder<T> addAcceptedTypes(Class... elements) Adds elements toacceptedTypeslist.final ImmutableOperation.Builder<T> addAllAcceptedTypes(Iterable<? extends Class> elements) Adds elements toacceptedTypeslist.build()Builds a newOperation.final ImmutableOperation.Builder<T> compute(BiFunction<T[], Object[], Object> compute) Initializes the value for thecomputeattribute.private Stringfinal ImmutableOperation.Builder<T> Fill a builder with attribute values from the providedOperationinstance.final ImmutableOperation.Builder<T> Initializes the value for thenameattribute.final ImmutableOperation.Builder<T> prettyName(String prettyName) Initializes the value for theprettyNameattribute.final ImmutableOperation.Builder<T> returnedType(Class returnedType) Initializes the value for thereturnedTypeattribute.
-
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_COMPUTE
private static final long INIT_BIT_COMPUTE- See Also:
-
initBits
private long initBits -
name
-
acceptedTypes
-
returnedType
-
compute
-
prettyName
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedOperationinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
addAcceptedTypes
Adds one element toacceptedTypeslist.- Parameters:
element- A acceptedTypes element- Returns:
thisbuilder for use in a chained invocation
-
addAcceptedTypes
Adds elements toacceptedTypeslist.- Parameters:
elements- An array of acceptedTypes elements- Returns:
thisbuilder for use in a chained invocation
-
acceptedTypes
Sets or replaces all elements foracceptedTypeslist.- Parameters:
elements- An iterable of acceptedTypes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAcceptedTypes
Adds elements toacceptedTypeslist.- Parameters:
elements- An iterable of acceptedTypes elements- Returns:
thisbuilder for use in a chained invocation
-
returnedType
Initializes the value for thereturnedTypeattribute.- Parameters:
returnedType- The value for returnedType- Returns:
thisbuilder for use in a chained invocation
-
compute
Initializes the value for thecomputeattribute.- Parameters:
compute- The value for compute- Returns:
thisbuilder for use in a chained invocation
-
prettyName
Initializes the value for theprettyNameattribute.If not set, this attribute will have a default value as returned by the initializer of
prettyName.- Parameters:
prettyName- The value for prettyName- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newOperation.- Returns:
- An immutable instance of Operation
- Throws:
IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
-