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.
Description
Section titled “Description”Two points with the same coordinates are equal.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
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). |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Creation details
Section titled “Creation details”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).
Method details
Section titled “Method details”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.
toString
Section titled “toString”String toString()
Returns the coordinates, for logs.
equals
Section titled “equals”boolean equals(Object other)
If true, the other object is of the same class with the same coordinates.
hashCode
Section titled “hashCode”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
