@NotThreadSafe public static final class ImmutableDatacenter.Builder extends Object
ImmutableDatacenter.
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 |
|---|---|
ImmutableDatacenter.Builder |
addAllCoordinates(Iterable<? extends Coordinate> elements)
Adds elements to
coordinates list. |
ImmutableDatacenter.Builder |
addCoordinates(Coordinate... elements)
Adds elements to
coordinates list. |
ImmutableDatacenter.Builder |
addCoordinates(Coordinate element)
Adds one element to
coordinates list. |
ImmutableDatacenter |
build()
Builds a new
ImmutableDatacenter. |
ImmutableDatacenter.Builder |
coordinates(Iterable<? extends Coordinate> elements)
Sets or replaces all elements for
coordinates list. |
ImmutableDatacenter.Builder |
datacenter(String datacenter)
Initializes the value for the
datacenter attribute. |
ImmutableDatacenter.Builder |
from(Datacenter instance)
Fill a builder with attribute values from the provided
Datacenter instance. |
@CanIgnoreReturnValue public final ImmutableDatacenter.Builder from(Datacenter instance)
Datacenter 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 ImmutableDatacenter.Builder datacenter(String datacenter)
datacenter attribute.datacenter - The value for datacenterthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableDatacenter.Builder addCoordinates(Coordinate element)
coordinates list.element - A coordinates elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableDatacenter.Builder addCoordinates(Coordinate... elements)
coordinates list.elements - An array of coordinates elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableDatacenter.Builder coordinates(Iterable<? extends Coordinate> elements)
coordinates list.elements - An iterable of coordinates elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableDatacenter.Builder addAllCoordinates(Iterable<? extends Coordinate> elements)
coordinates list.elements - An iterable of coordinates elementsthis builder for use in a chained invocationpublic ImmutableDatacenter build()
ImmutableDatacenter.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.