@Override public boolean equals(Object obj){
  if (obj == this) {
    return true;
  }
  if (!super.equals(obj)) {
    return false;
  }
  if (!(obj instanceof XYPolygonAnnotation)) {
    return false;
  }
  XYPolygonAnnotation that=(XYPolygonAnnotation)obj;
  if (!Arrays.equals(this.polygon,that.polygon)) {
    return false;
  }
  if (!ObjectUtilities.equal(this.stroke,that.stroke)) {
    return false;
  }
  if (!PaintUtilities.equal(this.outlinePaint,that.outlinePaint)) {
    return false;
  }
  if (!PaintUtilities.equal(this.fillPaint,that.fillPaint)) {
    return false;
  }
  return true;
}

@ Override public boolean equals ( Object obj ) { if ( obj == this ) { return true ; } if ( ! super . equals ( obj ) ) { return false ; } if ( ! ( obj instanceof XYPolygonAnnotation ) ) { return false ; } XYPolygonAnnotation that = ( XYPolygonAnnotation ) obj ; if ( ! Arrays . equals ( this . polygon , that . polygon ) ) { return false ; } if ( ! ObjectUtilities . equal ( this . stroke , that . stroke ) ) { return false ; } if ( ! PaintUtilities . equal ( this . outlinePaint , that . outlinePaint ) ) { return false ; } if ( ! PaintUtilities . equal ( this . fillPaint , that . fillPaint ) ) { return false ; } return true ; }
tests this annotation for equality with an arbitrary object .
