@NotThreadSafe public static final class ImmutableValidationError.Builder extends Object
ImmutableValidationError.
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.
@CanIgnoreReturnValue public final ImmutableValidationError.Builder from(ValidationError instance)
ValidationError instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationError.Builder addErrorMessages(ErrorMessage element)
errorMessages list.element - A errorMessages elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationError.Builder addErrorMessages(ErrorMessage... elements)
errorMessages list.elements - An array of errorMessages elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationError.Builder errorMessages(Iterable<? extends ErrorMessage> elements)
errorMessages list.elements - An iterable of errorMessages elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationError.Builder addAllErrorMessages(Iterable<? extends ErrorMessage> elements)
errorMessages list.elements - An iterable of errorMessages elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationError.Builder addInvalidReferences(ValueSource<?> element)
invalidReferences set.element - A invalidReferences elementthis builder for use in a chained invocation@CanIgnoreReturnValue @SafeVarargs public final ImmutableValidationError.Builder addInvalidReferences(ValueSource<?>... elements)
invalidReferences set.elements - An array of invalidReferences elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationError.Builder invalidReferences(Iterable<? extends ValueSource<?>> elements)
invalidReferences set.elements - An iterable of invalidReferences elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationError.Builder addAllInvalidReferences(Iterable<? extends ValueSource<?>> elements)
invalidReferences set.elements - An iterable of invalidReferences elementsthis builder for use in a chained invocationpublic ImmutableValidationError build()
ImmutableValidationError.IllegalStateException - if any required attributes are missingCopyright © 2023. All rights reserved.