compareToSameClass method
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 o) {
Set theseElements = SplayTreeSet.from(geometries);
Set otherElements = SplayTreeSet.from((o as GeometryCollection).geometries);
return compare(theseElements.toList(), otherElements.toList());
}