public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    BasicShapeAttributes that = (BasicShapeAttributes) o;

    if (drawOutline != that.drawOutline) return false;
    if (drawInterior != that.drawInterior) return false;
    if (enableAntialiasing != that.enableAntialiasing) return false;
    if (Double.compare(that.outlineOpacity, outlineOpacity) != 0) return false;
    if (Double.compare(that.interiorOpacity, interiorOpacity) != 0) return false;
    if (Double.compare(that.outlineWidth, outlineWidth) != 0) return false;
    if (that.outlineStippleFactor != outlineStippleFactor) return false;
    if (that.outlineStipplePattern != outlineStipplePattern) return false;
    if (interiorMaterial != null
        ? !interiorMaterial.equals(that.interiorMaterial)
        : that.interiorMaterial != null) return false;
    if (outlineMaterial != null
        ? !outlineMaterial.equals(that.outlineMaterial)
        : that.outlineMaterial != null) return false;
    if (interiorImageSource != null
        ? !interiorImageSource.equals(that.interiorImageSource)
        : that.interiorImageSource != null) return false;
    //noinspection RedundantIfStatement
    if (Double.compare(that.interiorImageScale, interiorImageScale) != 0) return false;

    return true;
  }
 public int hashCode() {
   int result;
   long temp;
   result = (drawInterior ? 1 : 0);
   result = 31 * result + (drawOutline ? 1 : 0);
   result = 31 * result + (enableAntialiasing ? 1 : 0);
   result = 31 * result + (interiorMaterial != null ? interiorMaterial.hashCode() : 0);
   result = 31 * result + (outlineMaterial != null ? outlineMaterial.hashCode() : 0);
   temp = interiorOpacity != +0.0d ? Double.doubleToLongBits(interiorOpacity) : 0L;
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   temp = outlineOpacity != +0.0d ? Double.doubleToLongBits(outlineOpacity) : 0L;
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   temp = outlineWidth != +0.0d ? Double.doubleToLongBits(outlineWidth) : 0L;
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   temp = outlineStippleFactor;
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   temp = outlineStipplePattern;
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   result = 31 * result + (interiorImageSource != null ? interiorImageSource.hashCode() : 0);
   temp = Double.doubleToLongBits(interiorImageScale);
   result = 31 * result + (int) (temp ^ (temp >>> 32));
   return result;
 }