- Companion
- object
Value members
Constructors
Constructs a <code>Coordinate</code> having the same (x,y,z) values as <code>other</code>.
Constructs a <code>Coordinate</code> having the same (x,y,z) values as <code>other</code>.
- Value Params
- c
the <code>Coordinate</code> to copy.
Constructs a <code>Coordinate</code> at (x,y,NaN).
Constructs a <code>Coordinate</code> at (x,y,NaN).
- Value Params
- x
the x-value
- y
the y-value
Concrete methods
Compares this {link Coordinate} with the specified {link Coordinate} for order. This method ignores the z value when making the comparison. Returns:
Compares this {link Coordinate} with the specified {link Coordinate} for order. This method ignores the z value when making the comparison. Returns:
<UL> <LI> -1 : this.x < other.x || ((this.x == other.x) && (this.y < other.y)) <LI> 0 : this.x == other.x && this.y = other.y <LI> 1 : this.x > other.x || ((this.x == other.x) && (this.y > other.y))
</UL> Note: This method assumes that ordinate values are valid numbers. NaN values are not handled correctly.
- Value Params
- o
the <code>Coordinate</code> with which this <code>Coordinate</code> is being compared return -1, zero, or 1 as this <code>Coordinate</code> is less than, equal to, or greater than the specified <code>Coordinate</code>
- Definition Classes
- Comparable
Creates a copy of this Coordinate.
Creates a copy of this Coordinate.
return a copy of this coordinate.
Computes the 2-dimensional Euclidean distance to another location. The Z-ordinate is ignored.
Computes the 2-dimensional Euclidean distance to another location. The Z-ordinate is ignored.
- Value Params
- c
a point return the 2-dimensional Euclidean distance between the locations
Computes the 3-dimensional Euclidean distance to another location.
Computes the 3-dimensional Euclidean distance to another location.
- Value Params
- c
a coordinate return the 3-dimensional Euclidean distance between the locations
Tests if another coordinate has the same value for Z, within a tolerance.
Tests if another coordinate has the same value for Z, within a tolerance.
- Value Params
- c
a coordinate
- tolerance
the tolerance value return true if the Z ordinates are within the given tolerance
Returns <code>true</code> if <code>other</code> has the same values for the x and y ordinates. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison.
Returns <code>true</code> if <code>other</code> has the same values for the x and y ordinates. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison.
- Value Params
- other
a <code>Coordinate</code> with which to do the comparison. return <code>true</code> if <code>other</code> is a <code>Coordinate</code> with the same values for the x and y ordinates.
- Definition Classes
- Any
Returns whether the planar projections of the two <code>Coordinate</code>s are equal.
Returns whether the planar projections of the two <code>Coordinate</code>s are equal.
- Value Params
- other
a <code>Coordinate</code> with which to do the 2D comparison. return <code>true</code> if the x- and y-coordinates are equal; the z-coordinates do not have to be equal.
Tests if another Coordinate has the same values for the X and Y ordinates, within a specified tolerance value. The Z ordinate is ignored.
Tests if another Coordinate has the same values for the X and Y ordinates, within a specified tolerance value. The Z ordinate is ignored.
- Value Params
- c
a <code>Coordinate</code> with which to do the 2D comparison.
- tolerance
the tolerance value to use return true if <code>other</code> is a <code>Coordinate</code> with the same values for X and Y.
Tests if another coordinate has the same values for the X, Y and Z ordinates.
Tests if another coordinate has the same values for the X, Y and Z ordinates.
- Value Params
- other
a <code>Coordinate</code> with which to do the 3D comparison. return true if <code>other</code> is a <code>Coordinate</code> with the same values for X, Y and Z.
Retrieves the value of the measure, if present. If no measure value is present returns <tt>NaN</tt>.
Retrieves the value of the measure, if present. If no measure value is present returns <tt>NaN</tt>.
return the value of the measure, or <tt>NaN</tt>
Gets the ordinate value for the given index.
Gets the ordinate value for the given index.
The base implementation supports values for the index are {link X}, {link Y}, and {link Z}.
- Value Params
- ordinateIndex
the ordinate index return the value of the ordinate throws IllegalArgumentException if the index is not valid
Retrieves the value of the X ordinate.
Retrieves the value of the X ordinate.
return the value of the X ordinate
Retrieves the value of the Y ordinate.
Retrieves the value of the Y ordinate.
return the value of the Y ordinate
Retrieves the value of the Z ordinate, if present. If no Z value is present returns <tt>NaN</tt>.
Retrieves the value of the Z ordinate, if present. If no Z value is present returns <tt>NaN</tt>.
return the value of the Z ordinate, or <tt>NaN</tt>
Gets a hashcode for this coordinate.
Gets a hashcode for this coordinate.
return a hashcode for this coordinate
- Definition Classes
- Any
Sets this <code>Coordinate</code>s (x,y,z) values to that of <code>other</code>.
Sets this <code>Coordinate</code>s (x,y,z) values to that of <code>other</code>.
- Value Params
- other
the <code>Coordinate</code> to copy
Sets the measure value, if supported.
Sets the measure value, if supported.
- Value Params
- m
the value to set as M
Sets the ordinate for the given index to a given value.
Sets the ordinate for the given index to a given value.
The base implementation supported values for the index are {link X}, {link Y}, and {link Z}.
- Value Params
- ordinateIndex
the ordinate index
- value
the value to set throws IllegalArgumentException if the index is not valid