@NotThreadSafe public static final class ImmutableExplainValue.Builder<T> extends Object
ImmutableExplainValue.
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 |
|---|---|
ImmutableExplainValue<T> |
build()
Builds a new
ImmutableExplainValue. |
ImmutableExplainValue.Builder<T> |
calculation(Calculation<T> calculation)
Initializes the optional value
calculation to calculation. |
ImmutableExplainValue.Builder<T> |
calculation(Optional<? extends Calculation<T>> calculation)
Initializes the optional value
calculation to calculation. |
ImmutableExplainValue.Builder<T> |
destination(Value<T> destination)
Initializes the value for the
destination attribute. |
ImmutableExplainValue.Builder<T> |
from(Explanation.ExplainValue<T> instance)
Fill a builder with attribute values from the provided
ExplainValue instance. |
ImmutableExplainValue.Builder<T> |
validation(Optional<? extends Validation<T>> validation)
Initializes the optional value
validation to validation. |
ImmutableExplainValue.Builder<T> |
validation(Validation<T> validation)
Initializes the optional value
validation to validation. |
@CanIgnoreReturnValue public final ImmutableExplainValue.Builder<T> from(Explanation.ExplainValue<T> instance)
ExplainValue 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 ImmutableExplainValue.Builder<T> destination(Value<T> destination)
destination attribute.destination - The value for destinationthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableExplainValue.Builder<T> validation(Validation<T> validation)
validation to validation.validation - The value for validationthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableExplainValue.Builder<T> validation(Optional<? extends Validation<T>> validation)
validation to validation.validation - The value for validationthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableExplainValue.Builder<T> calculation(Calculation<T> calculation)
calculation to calculation.calculation - The value for calculationthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableExplainValue.Builder<T> calculation(Optional<? extends Calculation<T>> calculation)
calculation to calculation.calculation - The value for calculationthis builder for use in a chained invocationpublic ImmutableExplainValue<T> build()
ImmutableExplainValue.IllegalStateException - if any required attributes are missingCopyright © 2023. All rights reserved.