@NotThreadSafe public static final class ImmutableCoord.Builder extends Object
ImmutableCoord.
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 |
|---|---|
ImmutableCoord.Builder |
adjustment(double adjustment)
Initializes the value for the
adjustment attribute. |
ImmutableCoord |
build()
Builds a new
ImmutableCoord. |
ImmutableCoord.Builder |
error(double error)
Initializes the value for the
error attribute. |
ImmutableCoord.Builder |
from(Coord instance)
Fill a builder with attribute values from the provided
Coord instance. |
ImmutableCoord.Builder |
height(double height)
Initializes the value for the
height attribute. |
ImmutableCoord.Builder |
vec(double... elements)
Initializes the value for the
vec attribute. |
public final ImmutableCoord.Builder from(Coord instance)
Coord instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableCoord.Builder adjustment(double adjustment)
adjustment attribute.adjustment - The value for adjustmentthis builder for use in a chained invocationpublic final ImmutableCoord.Builder error(double error)
error attribute.error - The value for errorthis builder for use in a chained invocationpublic final ImmutableCoord.Builder height(double height)
height attribute.height - The value for heightthis builder for use in a chained invocationpublic final ImmutableCoord.Builder vec(double... elements)
vec attribute.elements - The elements for vecthis builder for use in a chained invocationpublic ImmutableCoord build()
ImmutableCoord.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.