@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCoord extends Coord
Coord.
Use the builder to create immutable instances:
ImmutableCoord.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableCoord.Builder
Builds instances of type
ImmutableCoord. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableCoord.Builder |
builder()
Creates a builder for
ImmutableCoord. |
static ImmutableCoord |
copyOf(Coord instance)
Creates an immutable copy of a
Coord value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableCoord that have equal attribute values. |
double |
getAdjustment() |
double |
getError() |
double |
getHeight() |
double[] |
getVec() |
int |
hashCode()
Computes a hash code from attributes:
adjustment, error, height, vec. |
String |
toString()
Prints the immutable value
Coord with attribute values. |
ImmutableCoord |
withAdjustment(double value)
Copy the current immutable object by setting a value for the
adjustment attribute. |
ImmutableCoord |
withError(double value)
Copy the current immutable object by setting a value for the
error attribute. |
ImmutableCoord |
withHeight(double value)
Copy the current immutable object by setting a value for the
height attribute. |
ImmutableCoord |
withVec(double... elements)
Copy the current immutable object with elements that replace the content of
vec. |
public double getAdjustment()
getAdjustment in class Coordadjustment attributepublic double getError()
public double getHeight()
public final ImmutableCoord withAdjustment(double value)
adjustment attribute.
A value strict bits equality used to prevent copying of the same value by returning this.value - A new value for adjustmentthis objectpublic final ImmutableCoord withError(double value)
error attribute.
A value strict bits equality used to prevent copying of the same value by returning this.value - A new value for errorthis objectpublic final ImmutableCoord withHeight(double value)
height attribute.
A value strict bits equality used to prevent copying of the same value by returning this.value - A new value for heightthis objectpublic final ImmutableCoord withVec(double... elements)
vec.
The array is cloned before being saved as attribute values.elements - The non-null elements for vecthis objectpublic boolean equals(@Nullable Object another)
ImmutableCoord that have equal attribute values.public int hashCode()
adjustment, error, height, vec.public String toString()
Coord with attribute values.public static ImmutableCoord copyOf(Coord instance)
Coord value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableCoord.Builder builder()
ImmutableCoord.
ImmutableCoord.builder()
.adjustment(double) // required adjustment
.error(double) // required error
.height(double) // required height
.vec(double) // required vec
.build();
Copyright © 2019. All rights reserved.