@NotThreadSafe public static final class ImmutableValidatedValue.Builder<T> extends Object
ImmutableValidatedValue.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableValidatedValue<T> |
build()
Builds a new
ImmutableValidatedValue. |
ImmutableValidatedValue.Builder<T> |
from(ValidatedValue<T> instance)
Fill a builder with attribute values from the provided
ValidatedValue instance. |
ImmutableValidatedValue.Builder<T> |
valueOrError(de.flapdoodle.types.Either<T,ValidationError> valueOrError)
Initializes the value for the
valueOrError attribute. |
@CanIgnoreReturnValue public final ImmutableValidatedValue.Builder<T> from(ValidatedValue<T> instance)
ValidatedValue instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidatedValue.Builder<T> valueOrError(de.flapdoodle.types.Either<T,ValidationError> valueOrError)
valueOrError attribute.valueOrError - The value for valueOrErrorthis builder for use in a chained invocationpublic ImmutableValidatedValue<T> build()
ImmutableValidatedValue.IllegalStateException - if any required attributes are missingCopyright © 2023. All rights reserved.