Class ImmutableCoord
java.lang.Object
org.kiwiproject.consul.model.coordinate.Coord
org.kiwiproject.consul.model.coordinate.ImmutableCoord
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCoord
extends Coord
Immutable implementation of
Coord.
Use the builder to create immutable instances:
ImmutableCoord.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableCoord.Builderbuilder()Creates a builder forImmutableCoord.static ImmutableCoordCreates an immutable copy of aCoordvalue.booleanThis instance is equal to all instances ofImmutableCoordthat have equal attribute values.doubledoublegetError()doubledouble[]getVec()inthashCode()Computes a hash code from attributes:adjustment,error,height,vec.toString()Prints the immutable valueCoordwith attribute values.final ImmutableCoordwithAdjustment(double value) Copy the current immutable object by setting a value for theadjustmentattribute.final ImmutableCoordwithError(double value) Copy the current immutable object by setting a value for theerrorattribute.final ImmutableCoordwithHeight(double value) Copy the current immutable object by setting a value for theheightattribute.final ImmutableCoordwithVec(double... elements) Copy the current immutable object with elements that replace the content ofvec.
-
Method Details
-
getAdjustment
public double getAdjustment()- Specified by:
getAdjustmentin classCoord- Returns:
- The value of the
adjustmentattribute
-
getError
public double getError() -
getHeight
public double getHeight() -
getVec
public double[] getVec() -
withAdjustment
Copy the current immutable object by setting a value for theadjustmentattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for adjustment- Returns:
- A modified copy of the
thisobject
-
withError
Copy the current immutable object by setting a value for theerrorattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for error- Returns:
- A modified copy of the
thisobject
-
withHeight
Copy the current immutable object by setting a value for theheightattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for height- Returns:
- A modified copy of the
thisobject
-
withVec
Copy the current immutable object with elements that replace the content ofvec. The array is cloned before being saved as attribute values.- Parameters:
elements- The non-null elements for vec- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableCoordthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:adjustment,error,height,vec. -
toString
Prints the immutable valueCoordwith attribute values. -
copyOf
Creates an immutable copy of aCoordvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Coord instance
-
builder
Creates a builder forImmutableCoord.ImmutableCoord.builder() .adjustment(double) // requiredadjustment.error(double) // requirederror.height(double) // requiredheight.vec(double) // requiredvec.build();- Returns:
- A new ImmutableCoord builder
-