Class OptimizationAlgorithmPluginResult.Builder
java.lang.Object
com.dna.jopt.cloud.touroptimizer.pluginservice.algorithm.OptimizationAlgorithmPluginResult.Builder
- All Implemented Interfaces:
OptimizationAlgorithmPluginResult.BuildFinal,OptimizationAlgorithmPluginResult.StatusBuildStage
- Enclosing class:
- OptimizationAlgorithmPluginResult
@NotThreadSafe
public static final class OptimizationAlgorithmPluginResult.Builder
extends Object
implements OptimizationAlgorithmPluginResult.StatusBuildStage, OptimizationAlgorithmPluginResult.BuildFinal
Builds instances of type
OptimizationAlgorithmPluginResult.
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 TypeMethodDescriptionAdds elements toenslist.Adds one element toenslist.Adds elements toenslist.build()Builds a newOptimizationAlgorithmPluginResult.status(AlgorithmPluginResultStatus status) Initializes the value for thestatusattribute.
-
Method Details
-
addEns
@CanIgnoreReturnValue public final OptimizationAlgorithmPluginResult.Builder addEns(IEntity element) Adds one element toenslist.- Specified by:
addEnsin interfaceOptimizationAlgorithmPluginResult.BuildFinal- Parameters:
element- A ens element- Returns:
thisbuilder for use in a chained invocation
-
addEns
@CanIgnoreReturnValue public final OptimizationAlgorithmPluginResult.Builder addEns(IEntity... elements) Adds elements toenslist.- Specified by:
addEnsin interfaceOptimizationAlgorithmPluginResult.BuildFinal- Parameters:
elements- An array of ens elements- Returns:
thisbuilder for use in a chained invocation
-
addAllEns
@CanIgnoreReturnValue public final OptimizationAlgorithmPluginResult.Builder addAllEns(Iterable<? extends IEntity> elements) Adds elements toenslist.- Specified by:
addAllEnsin interfaceOptimizationAlgorithmPluginResult.BuildFinal- Parameters:
elements- An iterable of ens elements- Returns:
thisbuilder for use in a chained invocation
-
status
@CanIgnoreReturnValue public final OptimizationAlgorithmPluginResult.Builder status(AlgorithmPluginResultStatus status) Initializes the value for thestatusattribute.- Specified by:
statusin interfaceOptimizationAlgorithmPluginResult.StatusBuildStage- Parameters:
status- The value for status- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newOptimizationAlgorithmPluginResult.- Specified by:
buildin interfaceOptimizationAlgorithmPluginResult.BuildFinal- Returns:
- An immutable instance of OptimizationAlgorithmPluginResult
- Throws:
IllegalStateException- if any required attributes are missing
-