@Test public void testEquals() { CategoryPointerAnnotation a1 = new CategoryPointerAnnotation("Label", "Key 1", 20.0, Math.PI); CategoryPointerAnnotation a2 = new CategoryPointerAnnotation("Label", "Key 1", 20.0, Math.PI); assertEquals(a1, a2); a1 = new CategoryPointerAnnotation("Label2", "Key 1", 20.0, Math.PI); assertFalse(a1.equals(a2)); a2 = new CategoryPointerAnnotation("Label2", "Key 1", 20.0, Math.PI); assertEquals(a1, a2); a1.setCategory("Key 2"); assertFalse(a1.equals(a2)); a2.setCategory("Key 2"); assertEquals(a1, a2); a1.setValue(22.0); assertFalse(a1.equals(a2)); a2.setValue(22.0); assertEquals(a1, a2); a1.setAngle(Math.PI / 4.0); assertFalse(a1.equals(a2)); a2.setAngle(Math.PI / 4.0); assertEquals(a1, a2); a1.setTipRadius(20.0); assertFalse(a1.equals(a2)); a2.setTipRadius(20.0); assertEquals(a1, a2); a1.setBaseRadius(5.0); assertFalse(a1.equals(a2)); a2.setBaseRadius(5.0); assertEquals(a1, a2); a1.setArrowLength(33.0); assertFalse(a1.equals(a2)); a2.setArrowLength(33.0); assertEquals(a1, a2); a1.setArrowWidth(9.0); assertFalse(a1.equals(a2)); a2.setArrowWidth(9.0); assertEquals(a1, a2); Stroke stroke = new BasicStroke(1.5f); a1.setArrowStroke(stroke); assertFalse(a1.equals(a2)); a2.setArrowStroke(stroke); assertEquals(a1, a2); a1.setArrowPaint(Color.BLUE); assertFalse(a1.equals(a2)); a2.setArrowPaint(Color.BLUE); assertEquals(a1, a2); a1.setLabelOffset(10.0); assertFalse(a1.equals(a2)); a2.setLabelOffset(10.0); assertEquals(a1, a2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryPointerAnnotation)) { return false; } if (!super.equals(obj)) { return false; } CategoryPointerAnnotation that = (CategoryPointerAnnotation) obj; if (this.angle != that.angle) { return false; } if (this.tipRadius != that.tipRadius) { return false; } if (this.baseRadius != that.baseRadius) { return false; } if (this.arrowLength != that.arrowLength) { return false; } if (this.arrowWidth != that.arrowWidth) { return false; } if (!this.arrowPaint.equals(that.arrowPaint)) { return false; } if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) { return false; } if (this.labelOffset != that.labelOffset) { return false; } return true; }
CategoryPointerAnnotation extends CategoryTextAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryPointerAnnotation)) { return false; } if (!super.equals(obj)) { return false; } CategoryPointerAnnotation that = (CategoryPointerAnnotation) obj; if (this.angle != that.angle) { return false; } if (this.tipRadius != that.tipRadius) { return false; } if (this.baseRadius != that.baseRadius) { return false; } if (this.arrowLength != that.arrowLength) { return false; } if (this.arrowWidth != that.arrowWidth) { return false; } if (!this.arrowPaint.equals(that.arrowPaint)) { return false; } if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) { return false; } if (this.labelOffset != that.labelOffset) { return false; } return true; } }
CategoryPointerAnnotation extends CategoryTextAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryPointerAnnotation)) { return false; } if (!super.equals(obj)) { return false; } CategoryPointerAnnotation that = (CategoryPointerAnnotation) obj; if (this.angle != that.angle) { return false; } if (this.tipRadius != that.tipRadius) { return false; } if (this.baseRadius != that.baseRadius) { return false; } if (this.arrowLength != that.arrowLength) { return false; } if (this.arrowWidth != that.arrowWidth) { return false; } if (!this.arrowPaint.equals(that.arrowPaint)) { return false; } if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) { return false; } if (this.labelOffset != that.labelOffset) { return false; } return true; } CategoryPointerAnnotation(String label, Comparable key, double value,
            double angle); }
CategoryPointerAnnotation extends CategoryTextAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryPointerAnnotation)) { return false; } if (!super.equals(obj)) { return false; } CategoryPointerAnnotation that = (CategoryPointerAnnotation) obj; if (this.angle != that.angle) { return false; } if (this.tipRadius != that.tipRadius) { return false; } if (this.baseRadius != that.baseRadius) { return false; } if (this.arrowLength != that.arrowLength) { return false; } if (this.arrowWidth != that.arrowWidth) { return false; } if (!this.arrowPaint.equals(that.arrowPaint)) { return false; } if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) { return false; } if (this.labelOffset != that.labelOffset) { return false; } return true; } CategoryPointerAnnotation(String label, Comparable key, double value,
            double angle); double getAngle(); void setAngle(double angle); double getTipRadius(); void setTipRadius(double radius); double getBaseRadius(); void setBaseRadius(double radius); double getLabelOffset(); void setLabelOffset(double offset); double getArrowLength(); void setArrowLength(double length); double getArrowWidth(); void setArrowWidth(double width); Stroke getArrowStroke(); void setArrowStroke(Stroke stroke); Paint getArrowPaint(); void setArrowPaint(Paint paint); @Override void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea,
            CategoryAxis domainAxis, ValueAxis rangeAxis); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
CategoryPointerAnnotation extends CategoryTextAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryPointerAnnotation)) { return false; } if (!super.equals(obj)) { return false; } CategoryPointerAnnotation that = (CategoryPointerAnnotation) obj; if (this.angle != that.angle) { return false; } if (this.tipRadius != that.tipRadius) { return false; } if (this.baseRadius != that.baseRadius) { return false; } if (this.arrowLength != that.arrowLength) { return false; } if (this.arrowWidth != that.arrowWidth) { return false; } if (!this.arrowPaint.equals(that.arrowPaint)) { return false; } if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) { return false; } if (this.labelOffset != that.labelOffset) { return false; } return true; } CategoryPointerAnnotation(String label, Comparable key, double value,
            double angle); double getAngle(); void setAngle(double angle); double getTipRadius(); void setTipRadius(double radius); double getBaseRadius(); void setBaseRadius(double radius); double getLabelOffset(); void setLabelOffset(double offset); double getArrowLength(); void setArrowLength(double length); double getArrowWidth(); void setArrowWidth(double width); Stroke getArrowStroke(); void setArrowStroke(Stroke stroke); Paint getArrowPaint(); void setArrowPaint(Paint paint); @Override void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea,
            CategoryAxis domainAxis, ValueAxis rangeAxis); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); static final double DEFAULT_TIP_RADIUS; static final double DEFAULT_BASE_RADIUS; static final double DEFAULT_LABEL_OFFSET; static final double DEFAULT_ARROW_LENGTH; static final double DEFAULT_ARROW_WIDTH; }