@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","Coordinate"}) @Immutable public final class ImmutableCoordinate extends Coordinate
Coordinate.
Use the builder to create immutable instances:
ImmutableCoordinate.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableCoordinate.Builder
Builds instances of type
ImmutableCoordinate. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableCoordinate.Builder |
builder()
Creates a builder for
ImmutableCoordinate. |
static ImmutableCoordinate |
copyOf(Coordinate instance)
Creates an immutable copy of a
Coordinate value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableCoordinate that have equal attribute values. |
Coord |
getCoord() |
String |
getNode() |
int |
hashCode()
Computes a hash code from attributes:
node, coord. |
String |
toString()
Prints the immutable value
Coordinate with attribute values. |
ImmutableCoordinate |
withCoord(Coord value)
Copy the current immutable object by setting a value for the
coord attribute. |
ImmutableCoordinate |
withNode(String value)
Copy the current immutable object by setting a value for the
node attribute. |
public String getNode()
getNode in class Coordinatenode attributepublic Coord getCoord()
getCoord in class Coordinatecoord attributepublic final ImmutableCoordinate withNode(String value)
node attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for nodethis objectpublic final ImmutableCoordinate withCoord(Coord value)
coord attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for coordthis objectpublic boolean equals(@Nullable Object another)
ImmutableCoordinate that have equal attribute values.public int hashCode()
node, coord.public String toString()
Coordinate with attribute values.public static ImmutableCoordinate copyOf(Coordinate instance)
Coordinate 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 ImmutableCoordinate.Builder builder()
ImmutableCoordinate.Copyright © 2018. All rights reserved.