protected boolean equalsintern(Geometry other) { // Can be assumed to be the same subclass of Geometry, so it must be a // ComposedGeom, too. ComposedGeom cother = (ComposedGeom) other; if (cother.subgeoms == null && subgeoms == null) { return true; } else if (cother.subgeoms == null || subgeoms == null) { return false; } else if (cother.subgeoms.length != subgeoms.length) { return false; } else if (subgeoms.length == 0) { return true; } else { for (int i = 0; i < subgeoms.length; i++) { if (!cother.subgeoms[i].equalsintern(this.subgeoms[i])) { return false; } } } return true; }
protected boolean equalsintern(Geometry other) { // Can be assumed to be the same subclass of Geometry, so it must be a // ComposedGeom, too. ComposedGeom cother = (ComposedGeom) other; if (cother.subgeoms == null && subgeoms == null) { return true; } else if (cother.subgeoms == null || subgeoms == null) { return false; } else if (cother.subgeoms.length != subgeoms.length) { return false; } else if (subgeoms.length == 0) { return true; } else { for (int i = 0; i < subgeoms.length; i++) { if (!cother.subgeoms[i].equalsintern(this.subgeoms[i])) { return false; } } } return true; }
/** * geometry specific equals implementation - only defined for non-null * values * * @param other geometry to compare * @return true if equal, false otherwise */ public boolean equals(Geometry other) { return (other != null) && (this.dimension == other.dimension) && (this.type == other.type) && (this.srid == other.srid) && (this.haveMeasure == other.haveMeasure) && other.getClass().equals(this.getClass()) && this.equalsintern(other); }
/** * geometry specific equals implementation - only defined for non-null * values * * @param other geometry to compare * @return true if equal, false otherwise */ public boolean equals(Geometry other) { return (other != null) && (this.dimension == other.dimension) && (this.type == other.type) && (this.srid == other.srid) && (this.haveMeasure == other.haveMeasure) && other.getClass().equals(this.getClass()) && this.equalsintern(other); }