compareToSameClass method

int compareToSameClass(
  1. Object other
)
override

Returns whether this Geometry is greater than, equal to, or less than another Geometry having the same class.

@param o a Geometry having the same class as this Geometry @return a positive number, 0, or a negative number, depending on whether this object is greater than, equal to, or less than o, as defined in "Normal Form For Geometry" in the JTS Technical Specifications

Implementation

int compareToSameClass(Object other) {
  Point point = other as Point;
  return getCoordinate()!.compareTo(point.getCoordinate()!);
}