@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableValidationError extends Object implements ValidationError
ValidationError.
Use the builder to create immutable instances:
ImmutableValidationError.builder().
Use the static factory method to create immutable instances:
ImmutableValidationError.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableValidationError.Builder
Builds instances of type
ImmutableValidationError. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableValidationError.Builder |
builder()
Creates a builder for
ImmutableValidationError. |
static ImmutableValidationError |
copyOf(ValidationError instance)
Creates an immutable copy of a
ValidationError value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableValidationError that have equal attribute values. |
com.google.common.collect.ImmutableList<ErrorMessage> |
errorMessages() |
int |
hashCode()
Computes a hash code from attributes:
errorMessages, invalidReferences. |
com.google.common.collect.ImmutableSet<ValueSource<?>> |
invalidReferences() |
static ImmutableValidationError |
of(Iterable<? extends ErrorMessage> errorMessages,
Iterable<? extends ValueSource<?>> invalidReferences)
Construct a new immutable
ValidationError instance. |
static ImmutableValidationError |
of(List<ErrorMessage> errorMessages,
Set<ValueSource<?>> invalidReferences)
Construct a new immutable
ValidationError instance. |
String |
toString()
Prints the immutable value
ValidationError with attribute values. |
ImmutableValidationError |
withErrorMessages(ErrorMessage... elements)
Copy the current immutable object with elements that replace the content of
errorMessages. |
ImmutableValidationError |
withErrorMessages(Iterable<? extends ErrorMessage> elements)
Copy the current immutable object with elements that replace the content of
errorMessages. |
ImmutableValidationError |
withInvalidReferences(Iterable<? extends ValueSource<?>> elements)
Copy the current immutable object with elements that replace the content of
invalidReferences. |
ImmutableValidationError |
withInvalidReferences(ValueSource<?>... elements)
Copy the current immutable object with elements that replace the content of
invalidReferences. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitofpublic com.google.common.collect.ImmutableList<ErrorMessage> errorMessages()
errorMessages in interface ValidationErrorerrorMessages attributepublic com.google.common.collect.ImmutableSet<ValueSource<?>> invalidReferences()
invalidReferences in interface ValidationErrorinvalidReferences attributepublic final ImmutableValidationError withErrorMessages(ErrorMessage... elements)
errorMessages.elements - The elements to setthis objectpublic final ImmutableValidationError withErrorMessages(Iterable<? extends ErrorMessage> elements)
errorMessages.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of errorMessages elements to setthis object@SafeVarargs public final ImmutableValidationError withInvalidReferences(ValueSource<?>... elements)
invalidReferences.elements - The elements to setthis objectpublic final ImmutableValidationError withInvalidReferences(Iterable<? extends ValueSource<?>> elements)
invalidReferences.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of invalidReferences elements to setthis objectpublic boolean equals(@Nullable Object another)
ImmutableValidationError that have equal attribute values.public int hashCode()
errorMessages, invalidReferences.public String toString()
ValidationError with attribute values.public static ImmutableValidationError of(List<ErrorMessage> errorMessages, Set<ValueSource<?>> invalidReferences)
ValidationError instance.errorMessages - The value for the errorMessages attributeinvalidReferences - The value for the invalidReferences attributepublic static ImmutableValidationError of(Iterable<? extends ErrorMessage> errorMessages, Iterable<? extends ValueSource<?>> invalidReferences)
ValidationError instance.errorMessages - The value for the errorMessages attributeinvalidReferences - The value for the invalidReferences attributepublic static ImmutableValidationError copyOf(ValidationError instance)
ValidationError 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 ImmutableValidationError.Builder builder()
ImmutableValidationError.
ImmutableValidationError.builder()
.addErrorMessages|addAllErrorMessages(de.flapdoodle.formula.validation.ErrorMessage) // errorMessages elements
.addInvalidReferences|addAllInvalidReferences(de.flapdoodle.formula.ValueSource<?>) // invalidReferences elements
.build();
Copyright © 2023. All rights reserved.