Skip to content

Point

final class Point
Package: dev.joid.lib.utils.geom · Module: core · Source: Point.java

Immutable point of two or three double coordinates, compared by value.

Two points with the same coordinates are equal.

ReturnsSignatureSummary
Pointof(double x, double y) factoryReturns the point (x, y), with z at 0D.
Pointof(double x, double y, double z) factoryReturns the point (x, y, z).

ReturnsSignatureSummary
doublegetX()Returns the horizontal coordinate.
doublegetY()Returns the vertical coordinate.
doublegetZ()Returns the depth coordinate, 0D for a point of the plane.
StringtoString()Returns the coordinates, for logs.
booleanequals(Object other)If true, the other object is of the same class with the same coordinates.
inthashCode()Returns a hash of the values that equals compares.

Point of(double x, double y) factory

Returns the point (x, y), with z at 0D.

Point of(double x, double y, double z) factory

Returns the point (x, y, z).

double getX()

Returns the horizontal coordinate.

double getY()

Returns the vertical coordinate.

double getZ()

Returns the depth coordinate, 0D for a point of the plane.

String toString()

Returns the coordinates, for logs.

boolean equals(Object other)

If true, the other object is of the same class with the same coordinates.

int hashCode()

Returns a hash of the values that equals compares.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page