public int compareTo(Coordinate other) {
		if (x < other.x) {
			return -1;
		}
		if (x > other.x) {
			return 1;
		}
		if (y < other.y) {
			return -1;
		}
		if (y > other.y) {
			return 1;
		}
		return 0;
	}
public int compareTo ( Coordinate other ) { if ( x < other . x ) { return - 1 ; } if ( x > other . x ) { return 1 ; } if ( y < other . y ) { return - 1 ; } if ( y > other . y ) { return 1 ; } return 0 ; }
Compares this {@link Coordinate} with the specified {@link Coordinate} for order. 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.

@param other
the <code>Coordinate</code> with which this <code>Coordinate</code> is being compared. Can not be
null.
@return -1, zero, or 1 as this <code>Coordinate</code> is less than, equal to, or greater than the specified
<code>Coordinate</code>