@Test public void testEquals() { RingPlot plot1 = new RingPlot(null); RingPlot plot2 = new RingPlot(null); assertEquals(plot1, plot2); assertEquals(plot2, plot1); plot1.setCenterTextMode(CenterTextMode.FIXED); assertFalse(plot1.equals(plot2)); plot2.setCenterTextMode(CenterTextMode.FIXED); assertTrue(plot1.equals(plot2)); plot1.setCenterText("ABC"); assertFalse(plot1.equals(plot2)); plot2.setCenterText("ABC"); assertTrue(plot1.equals(plot2)); plot1.setCenterTextColor(Color.RED); assertFalse(plot1.equals(plot2)); plot2.setCenterTextColor(Color.RED); assertTrue(plot1.equals(plot2)); plot1.setCenterTextFont(new Font(Font.SERIF, Font.PLAIN, 7)); assertFalse(plot1.equals(plot2)); plot2.setCenterTextFont(new Font(Font.SERIF, Font.PLAIN, 7)); assertTrue(plot1.equals(plot2)); plot1.setCenterTextFormatter(new DecimalFormat("0.000")); assertFalse(plot1.equals(plot2)); plot2.setCenterTextFormatter(new DecimalFormat("0.000")); assertTrue(plot1.equals(plot2)); plot1.setSeparatorsVisible(false); assertFalse(plot1.equals(plot2)); plot2.setSeparatorsVisible(false); assertEquals(plot1, plot2); Stroke s = new BasicStroke(1.1f); plot1.setSeparatorStroke(s); assertFalse(plot1.equals(plot2)); plot2.setSeparatorStroke(s); assertEquals(plot1, plot2); plot1.setSeparatorPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 2.0f, 1.0f, Color.BLUE)); assertFalse(plot1.equals(plot2)); plot2.setSeparatorPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 2.0f, 1.0f, Color.BLUE)); assertEquals(plot1, plot2); plot1.setInnerSeparatorExtension(0.01); assertFalse(plot1.equals(plot2)); plot2.setInnerSeparatorExtension(0.01); assertEquals(plot1, plot2); plot1.setOuterSeparatorExtension(0.02); assertFalse(plot1.equals(plot2)); plot2.setOuterSeparatorExtension(0.02); assertEquals(plot1, plot2); plot1.setSectionDepth(0.12); assertFalse(plot1.equals(plot2)); plot2.setSectionDepth(0.12); assertEquals(plot1, plot2); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof RingPlot)) { return false; } RingPlot that = (RingPlot) obj; if (!this.centerTextMode.equals(that.centerTextMode)) { return false; } if (!ObjectUtilities.equal(this.centerText, that.centerText)) { return false; } if (!this.centerTextFormatter.equals(that.centerTextFormatter)) { return false; } if (!this.centerTextFont.equals(that.centerTextFont)) { return false; } if (!this.centerTextColor.equals(that.centerTextColor)) { return false; } if (this.separatorsVisible != that.separatorsVisible) { return false; } if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke)) { return false; } if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) { return false; } if (this.innerSeparatorExtension != that.innerSeparatorExtension) { return false; } if (this.outerSeparatorExtension != that.outerSeparatorExtension) { return false; } if (this.sectionDepth != that.sectionDepth) { return false; } return super.equals(obj); }
RingPlot extends PiePlot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof RingPlot)) { return false; } RingPlot that = (RingPlot) obj; if (!this.centerTextMode.equals(that.centerTextMode)) { return false; } if (!ObjectUtilities.equal(this.centerText, that.centerText)) { return false; } if (!this.centerTextFormatter.equals(that.centerTextFormatter)) { return false; } if (!this.centerTextFont.equals(that.centerTextFont)) { return false; } if (!this.centerTextColor.equals(that.centerTextColor)) { return false; } if (this.separatorsVisible != that.separatorsVisible) { return false; } if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke)) { return false; } if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) { return false; } if (this.innerSeparatorExtension != that.innerSeparatorExtension) { return false; } if (this.outerSeparatorExtension != that.outerSeparatorExtension) { return false; } if (this.sectionDepth != that.sectionDepth) { return false; } return super.equals(obj); } }
RingPlot extends PiePlot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof RingPlot)) { return false; } RingPlot that = (RingPlot) obj; if (!this.centerTextMode.equals(that.centerTextMode)) { return false; } if (!ObjectUtilities.equal(this.centerText, that.centerText)) { return false; } if (!this.centerTextFormatter.equals(that.centerTextFormatter)) { return false; } if (!this.centerTextFont.equals(that.centerTextFont)) { return false; } if (!this.centerTextColor.equals(that.centerTextColor)) { return false; } if (this.separatorsVisible != that.separatorsVisible) { return false; } if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke)) { return false; } if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) { return false; } if (this.innerSeparatorExtension != that.innerSeparatorExtension) { return false; } if (this.outerSeparatorExtension != that.outerSeparatorExtension) { return false; } if (this.sectionDepth != that.sectionDepth) { return false; } return super.equals(obj); } RingPlot();  RingPlot(PieDataset dataset); }
RingPlot extends PiePlot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof RingPlot)) { return false; } RingPlot that = (RingPlot) obj; if (!this.centerTextMode.equals(that.centerTextMode)) { return false; } if (!ObjectUtilities.equal(this.centerText, that.centerText)) { return false; } if (!this.centerTextFormatter.equals(that.centerTextFormatter)) { return false; } if (!this.centerTextFont.equals(that.centerTextFont)) { return false; } if (!this.centerTextColor.equals(that.centerTextColor)) { return false; } if (this.separatorsVisible != that.separatorsVisible) { return false; } if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke)) { return false; } if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) { return false; } if (this.innerSeparatorExtension != that.innerSeparatorExtension) { return false; } if (this.outerSeparatorExtension != that.outerSeparatorExtension) { return false; } if (this.sectionDepth != that.sectionDepth) { return false; } return super.equals(obj); } RingPlot();  RingPlot(PieDataset dataset); CenterTextMode getCenterTextMode(); void setCenterTextMode(CenterTextMode mode); String getCenterText(); void setCenterText(String text); Format getCenterTextFormatter(); void setCenterTextFormatter(Format formatter); Font getCenterTextFont(); void setCenterTextFont(Font font); Color getCenterTextColor(); void setCenterTextColor(Color color); boolean getSeparatorsVisible(); void setSeparatorsVisible(boolean visible); Stroke getSeparatorStroke(); void setSeparatorStroke(Stroke stroke); Paint getSeparatorPaint(); void setSeparatorPaint(Paint paint); double getInnerSeparatorExtension(); void setInnerSeparatorExtension(double percent); double getOuterSeparatorExtension(); void setOuterSeparatorExtension(double percent); double getSectionDepth(); void setSectionDepth(double sectionDepth); @Override PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea,
            PiePlot plot, Integer index, PlotRenderingInfo info); @Override boolean equals(Object obj); }
RingPlot extends PiePlot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof RingPlot)) { return false; } RingPlot that = (RingPlot) obj; if (!this.centerTextMode.equals(that.centerTextMode)) { return false; } if (!ObjectUtilities.equal(this.centerText, that.centerText)) { return false; } if (!this.centerTextFormatter.equals(that.centerTextFormatter)) { return false; } if (!this.centerTextFont.equals(that.centerTextFont)) { return false; } if (!this.centerTextColor.equals(that.centerTextColor)) { return false; } if (this.separatorsVisible != that.separatorsVisible) { return false; } if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke)) { return false; } if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) { return false; } if (this.innerSeparatorExtension != that.innerSeparatorExtension) { return false; } if (this.outerSeparatorExtension != that.outerSeparatorExtension) { return false; } if (this.sectionDepth != that.sectionDepth) { return false; } return super.equals(obj); } RingPlot();  RingPlot(PieDataset dataset); CenterTextMode getCenterTextMode(); void setCenterTextMode(CenterTextMode mode); String getCenterText(); void setCenterText(String text); Format getCenterTextFormatter(); void setCenterTextFormatter(Format formatter); Font getCenterTextFont(); void setCenterTextFont(Font font); Color getCenterTextColor(); void setCenterTextColor(Color color); boolean getSeparatorsVisible(); void setSeparatorsVisible(boolean visible); Stroke getSeparatorStroke(); void setSeparatorStroke(Stroke stroke); Paint getSeparatorPaint(); void setSeparatorPaint(Paint paint); double getInnerSeparatorExtension(); void setInnerSeparatorExtension(double percent); double getOuterSeparatorExtension(); void setOuterSeparatorExtension(double percent); double getSectionDepth(); void setSectionDepth(double sectionDepth); @Override PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea,
            PiePlot plot, Integer index, PlotRenderingInfo info); @Override boolean equals(Object obj);  }