@Test public void testHashCode() { XYDrawableAnnotation a1 = new XYDrawableAnnotation(10.0, 20.0, 100.0, 200.0, new TestDrawable()); XYDrawableAnnotation a2 = new XYDrawableAnnotation(10.0, 20.0, 100.0, 200.0, new TestDrawable()); assertEquals(a1, a2); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); }
@Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayWidth); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayHeight); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; }
XYDrawableAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayWidth); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayHeight); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } }
XYDrawableAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayWidth); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayHeight); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } XYDrawableAnnotation(double x, double y, double width, double height,
                                Drawable drawable);  XYDrawableAnnotation(double x, double y, double displayWidth,
            double displayHeight, double drawScaleFactor, Drawable drawable); }
XYDrawableAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayWidth); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayHeight); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } XYDrawableAnnotation(double x, double y, double width, double height,
                                Drawable drawable);  XYDrawableAnnotation(double x, double y, double displayWidth,
            double displayHeight, double drawScaleFactor, Drawable drawable); @Override void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea,
                     ValueAxis domainAxis, ValueAxis rangeAxis,
                     int rendererIndex,
                     PlotRenderingInfo info); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
XYDrawableAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayWidth); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.displayHeight); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } XYDrawableAnnotation(double x, double y, double width, double height,
                                Drawable drawable);  XYDrawableAnnotation(double x, double y, double displayWidth,
            double displayHeight, double drawScaleFactor, Drawable drawable); @Override void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea,
                     ValueAxis domainAxis, ValueAxis rangeAxis,
                     int rendererIndex,
                     PlotRenderingInfo info); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }