Class ImmutableCoord.Builder

java.lang.Object
org.kiwiproject.consul.model.coordinate.ImmutableCoord.Builder
Enclosing class:
ImmutableCoord

public static final class ImmutableCoord.Builder extends Object
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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableCoord.Builder from(Coord instance)
      Fill a builder with attribute values from the provided Coord instance. 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:
      this builder for use in a chained invocation
    • adjustment

      @CanIgnoreReturnValue public final ImmutableCoord.Builder adjustment(double adjustment)
      Initializes the value for the adjustment attribute.
      Parameters:
      adjustment - The value for adjustment
      Returns:
      this builder for use in a chained invocation
    • error

      @CanIgnoreReturnValue public final ImmutableCoord.Builder error(double error)
      Initializes the value for the error attribute.
      Parameters:
      error - The value for error
      Returns:
      this builder for use in a chained invocation
    • height

      @CanIgnoreReturnValue public final ImmutableCoord.Builder height(double height)
      Initializes the value for the height attribute.
      Parameters:
      height - The value for height
      Returns:
      this builder for use in a chained invocation
    • vec

      @CanIgnoreReturnValue public final ImmutableCoord.Builder vec(double... vec)
      Initializes the value for the vec attribute.
      Parameters:
      vec - The elements for vec
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableCoord build()
      Builds a new ImmutableCoord.
      Returns:
      An immutable instance of Coord
      Throws:
      IllegalStateException - if any required attributes are missing