@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableContext extends Context
Context.
Use the builder to create immutable instances:
ImmutableContext.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableContext.Builder
Builds instances of type
ImmutableContext. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableContext.Builder |
builder()
Creates a builder for
ImmutableContext. |
static ImmutableContext |
copyOf(Context instance)
Creates an immutable copy of a
Context value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableContext that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
unvalidated, validatedValues, validationErrorMap. |
String |
toString()
Prints the immutable value
Context with attribute values. |
protected ValueContainer |
unvalidated() |
protected ValueContainer |
validatedValues() |
protected com.google.common.collect.ImmutableMap<Value<?>,ValidationError> |
validationErrorMap() |
ImmutableContext |
withUnvalidated(ValueContainer value)
Copy the current immutable object by setting a value for the
unvalidated attribute. |
ImmutableContext |
withValidatedValues(ValueContainer value)
Copy the current immutable object by setting a value for the
validatedValues attribute. |
ImmutableContext |
withValidationErrorMap(Map<? extends Value<?>,? extends ValidationError> entries)
Copy the current immutable object by replacing the
validationErrorMap map with the specified map. |
add, addIfNotExist, addIfNotExist, addInvalid, addUnvalidated, asResult, check, empty, getUnvalidated, getValidated, isInvalid, isValid, validationErrorprotected ValueContainer unvalidated()
unvalidated in class Contextunvalidated attributeprotected ValueContainer validatedValues()
validatedValues in class ContextvalidatedValues attributeprotected com.google.common.collect.ImmutableMap<Value<?>,ValidationError> validationErrorMap()
validationErrorMap in class ContextvalidationErrorMap attributepublic final ImmutableContext withUnvalidated(ValueContainer value)
unvalidated attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for unvalidatedthis objectpublic final ImmutableContext withValidatedValues(ValueContainer value)
validatedValues attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for validatedValuesthis objectpublic final ImmutableContext withValidationErrorMap(Map<? extends Value<?>,? extends ValidationError> entries)
validationErrorMap map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the validationErrorMap mapthis objectpublic boolean equals(@Nullable Object another)
ImmutableContext that have equal attribute values.public int hashCode()
unvalidated, validatedValues, validationErrorMap.public String toString()
Context with attribute values.public static ImmutableContext copyOf(Context instance)
Context value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableContext.Builder builder()
ImmutableContext.
ImmutableContext.builder()
.unvalidated(de.flapdoodle.formula.ValueContainer) // optional unvalidated
.validatedValues(de.flapdoodle.formula.ValueContainer) // optional validatedValues
.putValidationErrorMap|putAllValidationErrorMap(de.flapdoodle.formula.Value<?> => de.flapdoodle.formula.validation.ValidationError) // validationErrorMap mappings
.build();
Copyright © 2023. All rights reserved.