@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableExplainValue<T> extends Explanation.ExplainValue<T>
Explanation.ExplainValue.
Use the builder to create immutable instances:
ImmutableExplainValue.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableExplainValue.Builder<T>
Builds instances of type
ImmutableExplainValue. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ImmutableExplainValue.Builder<T> |
builder()
Creates a builder for
ImmutableExplainValue. |
Optional<Calculation<T>> |
calculation() |
static <T> ImmutableExplainValue<T> |
copyOf(Explanation.ExplainValue<T> instance)
Creates an immutable copy of a
Explanation.ExplainValue value. |
Value<T> |
destination() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableExplainValue that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
destination, validation, calculation. |
String |
toString()
Prints the immutable value
ExplainValue with attribute values. |
Optional<Validation<T>> |
validation() |
ImmutableExplainValue<T> |
withCalculation(Calculation<T> value)
Copy the current immutable object by setting a present value for the optional
calculation attribute. |
ImmutableExplainValue<T> |
withCalculation(Optional<? extends Calculation<T>> optional)
Copy the current immutable object by setting an optional value for the
calculation attribute. |
ImmutableExplainValue<T> |
withDestination(Value<T> value)
Copy the current immutable object by setting a value for the
destination attribute. |
ImmutableExplainValue<T> |
withValidation(Optional<? extends Validation<T>> optional)
Copy the current immutable object by setting an optional value for the
validation attribute. |
ImmutableExplainValue<T> |
withValidation(Validation<T> value)
Copy the current immutable object by setting a present value for the optional
validation attribute. |
public Value<T> destination()
destination in class Explanation.ExplainValue<T>destination attributepublic Optional<Validation<T>> validation()
validation in class Explanation.ExplainValue<T>validation attributepublic Optional<Calculation<T>> calculation()
calculation in class Explanation.ExplainValue<T>calculation attributepublic final ImmutableExplainValue<T> withDestination(Value<T> value)
destination attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for destinationthis objectpublic final ImmutableExplainValue<T> withValidation(Validation<T> value)
validation attribute.value - The value for validationthis objectpublic final ImmutableExplainValue<T> withValidation(Optional<? extends Validation<T>> optional)
validation attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for validationthis objectpublic final ImmutableExplainValue<T> withCalculation(Calculation<T> value)
calculation attribute.value - The value for calculationthis objectpublic final ImmutableExplainValue<T> withCalculation(Optional<? extends Calculation<T>> optional)
calculation attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for calculationthis objectpublic boolean equals(@Nullable Object another)
ImmutableExplainValue that have equal attribute values.public int hashCode()
destination, validation, calculation.public String toString()
ExplainValue with attribute values.public static <T> ImmutableExplainValue<T> copyOf(Explanation.ExplainValue<T> instance)
Explanation.ExplainValue value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.T - generic parameter Tinstance - The instance to copypublic static <T> ImmutableExplainValue.Builder<T> builder()
ImmutableExplainValue.
ImmutableExplainValue.<T>builder()
.destination(de.flapdoodle.formula.Value<T>) // required destination
.validation(de.flapdoodle.formula.validation.Validation<T>) // optional validation
.calculation(de.flapdoodle.formula.calculate.Calculation<T>) // optional calculation
.build();
T - generic parameter TCopyright © 2023. All rights reserved.