Package io.dialob.api.questionnaire
Class ImmutableError.Builder
java.lang.Object
io.dialob.api.questionnaire.ImmutableError.Builder
- Enclosing class:
- ImmutableError
Builds instances of type
ImmutableError.
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 newImmutableError.final ImmutableError.BuilderInitializes the value for thecodeattribute.final ImmutableError.Builderdescription(String description) Initializes the value for thedescriptionattribute.final ImmutableError.BuilderFill a builder with attribute values from the providedErrorinstance.final ImmutableError.Builderfrom(ModifiableError instance) Fill a builder with attribute values from the providedModifiableErrorinstance.final ImmutableError.BuilderInitializes the value for theidattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedModifiableErrorinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedErrorinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
code
Initializes the value for thecodeattribute.- Parameters:
code- The value for code (can benull)- Returns:
thisbuilder for use in a chained invocation
-
description
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableError.- Returns:
- An immutable instance of Error
- Throws:
IllegalStateException- if any required attributes are missing
-