Class ConstructionOptimizationAlgorithmConfig.Builder
java.lang.Object
com.dna.jopt.framework.body.scheme.helper.ConstructionOptimizationAlgorithmConfig.Builder
- All Implemented Interfaces:
ConstructionOptimizationAlgorithmConfig.AlgorithmBuildStage
,ConstructionOptimizationAlgorithmConfig.BuildFinal
- Enclosing class:
- ConstructionOptimizationAlgorithmConfig
@NotThreadSafe
public static final class ConstructionOptimizationAlgorithmConfig.Builder
extends Object
implements ConstructionOptimizationAlgorithmConfig.AlgorithmBuildStage, ConstructionOptimizationAlgorithmConfig.BuildFinal
Builds instances of type
ConstructionOptimizationAlgorithmConfig
.
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.
-
Method Summary
Modifier and TypeMethodDescriptionalgorithm
(AbstractConstructionOptimizationAlgorithmConfig.ConstructionOptimizationAlgorithm algorithm) Initializes the value for thealgorithm
attribute.build()
Builds a newConstructionOptimizationAlgorithmConfig
.
-
Method Details
-
algorithm
@CanIgnoreReturnValue public final ConstructionOptimizationAlgorithmConfig.Builder algorithm(AbstractConstructionOptimizationAlgorithmConfig.ConstructionOptimizationAlgorithm algorithm) Initializes the value for thealgorithm
attribute.- Specified by:
algorithm
in interfaceConstructionOptimizationAlgorithmConfig.AlgorithmBuildStage
- Parameters:
algorithm
- The value for algorithm- Returns:
this
builder for use in a chained invocation
-
build
Builds a newConstructionOptimizationAlgorithmConfig
.- Specified by:
build
in interfaceConstructionOptimizationAlgorithmConfig.BuildFinal
- Returns:
- An immutable instance of ConstructionOptimizationAlgorithmConfig
- Throws:
IllegalStateException
- if any required attributes are missing
-