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