Class AlgorithmPluginResultStatus.Builder
java.lang.Object
com.dna.jopt.cloud.touroptimizer.pluginservice.algorithm.AlgorithmPluginResultStatus.Builder
- All Implemented Interfaces:
AlgorithmPluginResultStatus.BuildFinal
,AlgorithmPluginResultStatus.StatusBuildStage
- Enclosing class:
- AlgorithmPluginResultStatus
@NotThreadSafe
public static final class AlgorithmPluginResultStatus.Builder
extends Object
implements AlgorithmPluginResultStatus.StatusBuildStage, AlgorithmPluginResultStatus.BuildFinal
Builds instances of type
AlgorithmPluginResultStatus
.
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 TypeMethodDescriptionbuild()
Builds a newAlgorithmPluginResultStatus
.Initializes the value for thestatus
attribute.statusDescription
(String statusDescription) Initializes the optional valuestatusDescription
to statusDescription.statusDescription
(Optional<String> statusDescription) Initializes the optional valuestatusDescription
to statusDescription.
-
Method Details
-
statusDescription
@CanIgnoreReturnValue public final AlgorithmPluginResultStatus.Builder statusDescription(String statusDescription) Initializes the optional valuestatusDescription
to statusDescription.- Specified by:
statusDescription
in interfaceAlgorithmPluginResultStatus.BuildFinal
- Parameters:
statusDescription
- The value for statusDescription- Returns:
this
builder for chained invocation
-
statusDescription
@CanIgnoreReturnValue public final AlgorithmPluginResultStatus.Builder statusDescription(Optional<String> statusDescription) Initializes the optional valuestatusDescription
to statusDescription.- Specified by:
statusDescription
in interfaceAlgorithmPluginResultStatus.BuildFinal
- Parameters:
statusDescription
- The value for statusDescription- Returns:
this
builder for use in a chained invocation
-
status
@CanIgnoreReturnValue public final AlgorithmPluginResultStatus.Builder status(AbstractAlgorithmPluginResultStatus.AlgorithmPluginResultStatusTag status) Initializes the value for thestatus
attribute.- Specified by:
status
in interfaceAlgorithmPluginResultStatus.StatusBuildStage
- Parameters:
status
- The value for status- Returns:
this
builder for use in a chained invocation
-
build
Builds a newAlgorithmPluginResultStatus
.- Specified by:
build
in interfaceAlgorithmPluginResultStatus.BuildFinal
- Returns:
- An immutable instance of AlgorithmPluginResultStatus
- Throws:
IllegalStateException
- if any required attributes are missing
-