Record Class VCoord
java.lang.Object
java.lang.Record
ffx.numerics.clustering.visualization.VCoord
Immutable Virtual coordinate.
- Since:
- 1.0
- Author:
- Lars Behnke, 2013, Michael J. Schnieders
-
Constructor Summary
ConstructorsConstructorDescriptionVCoord(double x, double y) Constructs an immutable virtual coordinate with the given X and Y values. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this coordinate to another object for equality.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this coordinate in the form "Coord(x,y)" with values formatted to three decimal places.doublex()Returns the X coordinate value in model space.doubley()Returns the Y coordinate value in model space.
-
Constructor Details
-
VCoord
public VCoord(double x, double y) Constructs an immutable virtual coordinate with the given X and Y values.- Parameters:
x- the X value in model spacey- the Y value in model space
-
-
Method Details
-
x
public double x()Returns the X coordinate value in model space.- Returns:
- the X value
-
y
public double y()Returns the Y coordinate value in model space.- Returns:
- the Y value
-
equals
Compares this coordinate to another object for equality. Two VCoord instances are considered equal if both their X and Y values are exactly equal. -
toString
Returns a string representation of this coordinate in the form "Coord(x,y)" with values formatted to three decimal places. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
-