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