Class ImmutableCoord.Builder
- java.lang.Object
-
- com.orbitz.consul.model.coordinate.ImmutableCoord.Builder
-
- Enclosing class:
- ImmutableCoord
@NotThreadSafe public static final class ImmutableCoord.Builder extends java.lang.ObjectBuilds instances of typeImmutableCoord. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis 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 Type Method Description ImmutableCoord.Builderadjustment(double adjustment)Initializes the value for theadjustmentattribute.ImmutableCoordbuild()Builds a newImmutableCoord.ImmutableCoord.Buildererror(double error)Initializes the value for theerrorattribute.ImmutableCoord.Builderfrom(Coord instance)Fill a builder with attribute values from the providedCoordinstance.ImmutableCoord.Builderheight(double height)Initializes the value for theheightattribute.ImmutableCoord.Buildervec(double... vec)Initializes the value for thevecattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableCoord.Builder from(Coord instance)
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
@CanIgnoreReturnValue public final ImmutableCoord.Builder adjustment(double adjustment)
Initializes the value for theadjustmentattribute.- Parameters:
adjustment- The value for adjustment- Returns:
thisbuilder for use in a chained invocation
-
error
@CanIgnoreReturnValue public final ImmutableCoord.Builder error(double error)
Initializes the value for theerrorattribute.- Parameters:
error- The value for error- Returns:
thisbuilder for use in a chained invocation
-
height
@CanIgnoreReturnValue public final ImmutableCoord.Builder height(double height)
Initializes the value for theheightattribute.- Parameters:
height- The value for height- Returns:
thisbuilder for use in a chained invocation
-
vec
@CanIgnoreReturnValue public final ImmutableCoord.Builder vec(double... vec)
Initializes the value for thevecattribute.- Parameters:
vec- The elements for vec- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCoord build()
Builds a newImmutableCoord.- Returns:
- An immutable instance of Coord
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-