@NotThreadSafe public static final class ImmutableValidationMap.Builder extends Object
ImmutableValidationMap.
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 |
|---|---|
ImmutableValidationMap.Builder |
addAll(Validation<?>... elements)
Adds elements to
all list. |
ImmutableValidationMap.Builder |
addAll(Validation<?> element)
Adds one element to
all list. |
ImmutableValidationMap.Builder |
addAllAll(Iterable<? extends Validation<?>> elements)
Adds elements to
all list. |
ImmutableValidationMap.Builder |
all(Iterable<? extends Validation<?>> elements)
Sets or replaces all elements for
all list. |
ImmutableValidationMap |
build()
Builds a new
ImmutableValidationMap. |
ImmutableValidationMap.Builder |
from(ValidationMap instance)
Fill a builder with attribute values from the provided
ValidationMap instance. |
@CanIgnoreReturnValue public final ImmutableValidationMap.Builder from(ValidationMap instance)
ValidationMap 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 ImmutableValidationMap.Builder addAll(Validation<?> element)
all list.element - A all elementthis builder for use in a chained invocation@CanIgnoreReturnValue @SafeVarargs public final ImmutableValidationMap.Builder addAll(Validation<?>... elements)
all list.elements - An array of all elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationMap.Builder all(Iterable<? extends Validation<?>> elements)
all list.elements - An iterable of all elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableValidationMap.Builder addAllAll(Iterable<? extends Validation<?>> elements)
all list.elements - An iterable of all elementsthis builder for use in a chained invocationpublic ImmutableValidationMap build()
ImmutableValidationMap.IllegalStateException - if any required attributes are missingCopyright © 2023. All rights reserved.