code: @Override
      public int compareTo(final Coordinate other) {
          if (getX() < other.getX()) {
              return -1;
          }
          if (getX() > other.getX()) {
              return 1;
          }
          if (getY() < other.getY()) {
              return -1;
          }
          if (getY() > other.getY()) {
              return 1;
          }
          return 0;
      }
docs: 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 &lt; other.x || ((this.x == other.x) &amp;&amp; (this.y &lt; other.y))
  <LI>0 : this.x == other.x &amp;&amp; this.y = other.y
  <LI>1 : this.x &gt; other.x || ((this.x == other.x) &amp;&amp; (this.y &gt; 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
  @return -1, zero, or 1 as this <code>Coordinate</code> is less than, equal to, or greater
  than the specified <code>Coordinate</code>