public final class Point extends Object
point datatype in Postgres.
Uses double to represent the coordinates.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getX() |
double |
getY() |
int |
hashCode() |
static Point |
of(double x,
double y)
|
String |
toString() |
Point |
translate(double x,
double y)
Translate the point by the supplied amount by adding
x and y offsets. |
Point |
translate(int x,
int y)
Translate the point by the supplied amount by adding
x and y offsets. |
public static Point of(double x, double y)
x - the x axis coordinatey - the y axis coordinatePoint objectpublic double getX()
public double getY()
public Point translate(int x, int y)
x and y offsets.x - integer amount to add on the x axisy - integer amount to add on the y axisPoint with translated valuespublic Point translate(double x, double y)
x and y offsets.x - double amount to add on the x axisy - double amount to add on the y axisPoint with translated valuesCopyright © 2024. All rights reserved.