@Test public void testHashcode() { CategoryLineAnnotation a1 = new CategoryLineAnnotation("Category 1", 1.0, "Category 2", 2.0, Color.RED, new BasicStroke(1.0f)); CategoryLineAnnotation a2 = new CategoryLineAnnotation("Category 1", 1.0, "Category 2", 2.0, Color.RED, new BasicStroke(1.0f)); assertEquals(a1, a2); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); }
@Override public int hashCode() { int result = 193; result = 37 * result + this.category1.hashCode(); long temp = Double.doubleToLongBits(this.value1); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + this.category2.hashCode(); temp = Double.doubleToLongBits(this.value2); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.stroke.hashCode(); return result; }
CategoryLineAnnotation extends AbstractAnnotation implements CategoryAnnotation, Cloneable, PublicCloneable,
        Serializable { @Override public int hashCode() { int result = 193; result = 37 * result + this.category1.hashCode(); long temp = Double.doubleToLongBits(this.value1); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + this.category2.hashCode(); temp = Double.doubleToLongBits(this.value2); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.stroke.hashCode(); return result; } }
CategoryLineAnnotation extends AbstractAnnotation implements CategoryAnnotation, Cloneable, PublicCloneable,
        Serializable { @Override public int hashCode() { int result = 193; result = 37 * result + this.category1.hashCode(); long temp = Double.doubleToLongBits(this.value1); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + this.category2.hashCode(); temp = Double.doubleToLongBits(this.value2); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.stroke.hashCode(); return result; } CategoryLineAnnotation(Comparable category1, double value1,
                                  Comparable category2, double value2,
                                  Paint paint, Stroke stroke); }
CategoryLineAnnotation extends AbstractAnnotation implements CategoryAnnotation, Cloneable, PublicCloneable,
        Serializable { @Override public int hashCode() { int result = 193; result = 37 * result + this.category1.hashCode(); long temp = Double.doubleToLongBits(this.value1); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + this.category2.hashCode(); temp = Double.doubleToLongBits(this.value2); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.stroke.hashCode(); return result; } CategoryLineAnnotation(Comparable category1, double value1,
                                  Comparable category2, double value2,
                                  Paint paint, Stroke stroke); Comparable getCategory1(); void setCategory1(Comparable category); double getValue1(); void setValue1(double value); Comparable getCategory2(); void setCategory2(Comparable category); double getValue2(); void setValue2(double value); Paint getPaint(); void setPaint(Paint paint); Stroke getStroke(); void setStroke(Stroke stroke); @Override void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea,
                     CategoryAxis domainAxis, ValueAxis rangeAxis); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
CategoryLineAnnotation extends AbstractAnnotation implements CategoryAnnotation, Cloneable, PublicCloneable,
        Serializable { @Override public int hashCode() { int result = 193; result = 37 * result + this.category1.hashCode(); long temp = Double.doubleToLongBits(this.value1); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + this.category2.hashCode(); temp = Double.doubleToLongBits(this.value2); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.stroke.hashCode(); return result; } CategoryLineAnnotation(Comparable category1, double value1,
                                  Comparable category2, double value2,
                                  Paint paint, Stroke stroke); Comparable getCategory1(); void setCategory1(Comparable category); double getValue1(); void setValue1(double value); Comparable getCategory2(); void setCategory2(Comparable category); double getValue2(); void setValue2(double value); Paint getPaint(); void setPaint(Paint paint); Stroke getStroke(); void setStroke(Stroke stroke); @Override void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea,
                     CategoryAxis domainAxis, ValueAxis rangeAxis); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }