Class ImmutableCoord.Builder
java.lang.Object
org.kiwiproject.consul.model.coordinate.ImmutableCoord.Builder
- Enclosing class:
- ImmutableCoord
Builds instances of type
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.
-
Method Summary
Modifier and TypeMethodDescriptionfinal ImmutableCoord.Builderadjustment(double adjustment) Initializes the value for theadjustmentattribute.build()Builds a newImmutableCoord.final ImmutableCoord.Buildererror(double error) Initializes the value for theerrorattribute.final ImmutableCoord.BuilderFill a builder with attribute values from the providedCoordinstance.final ImmutableCoord.Builderheight(double height) Initializes the value for theheightattribute.final ImmutableCoord.Buildervec(double... vec) Initializes the value for thevecattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedCoordinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
adjustment
Initializes the value for theadjustmentattribute.- Parameters:
adjustment- The value for adjustment- Returns:
thisbuilder for use in a chained invocation
-
error
Initializes the value for theerrorattribute.- Parameters:
error- The value for error- Returns:
thisbuilder for use in a chained invocation
-
height
Initializes the value for theheightattribute.- Parameters:
height- The value for height- Returns:
thisbuilder for use in a chained invocation
-
vec
Initializes the value for thevecattribute.- Parameters:
vec- The elements for vec- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCoord.- Returns:
- An immutable instance of Coord
- Throws:
IllegalStateException- if any required attributes are missing
-