@Test public void testHashCode() { Stroke stroke = new BasicStroke(2.0f); XYLineAnnotation a1 = new XYLineAnnotation(10.0, 20.0, 100.0, 200.0, stroke, Color.BLUE); XYLineAnnotation a2 = new XYLineAnnotation(10.0, 20.0, 100.0, 200.0, stroke, Color.BLUE); 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.x1); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.x2); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y1); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y2); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x1); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.x2); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y1); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y2); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x1); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.x2); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y1); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y2); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } XYLineAnnotation(double x1, double y1, double x2, double y2);  XYLineAnnotation(double x1, double y1, double x2, double y2,
                            Stroke stroke, Paint paint); }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x1); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.x2); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y1); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y2); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } XYLineAnnotation(double x1, double y1, double x2, double y2);  XYLineAnnotation(double x1, double y1, double x2, double y2,
                            Stroke stroke, Paint paint); @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(); }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(this.x1); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.x2); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y1); result = 29 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.y2); result = 29 * result + (int) (temp ^ (temp >>> 32)); return result; } XYLineAnnotation(double x1, double y1, double x2, double y2);  XYLineAnnotation(double x1, double y1, double x2, double y2,
                            Stroke stroke, Paint paint); @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();  }