@Test public void testEquals() { CompassPlot plot1 = new CompassPlot(); CompassPlot plot2 = new CompassPlot(); assertEquals(plot1, plot2); plot1.setLabelType(CompassPlot.VALUE_LABELS); assertFalse(plot1.equals(plot2)); plot2.setLabelType(CompassPlot.VALUE_LABELS); assertEquals(plot1, plot2); plot1.setLabelFont(new Font("Serif", Font.PLAIN, 10)); assertFalse(plot1.equals(plot2)); plot2.setLabelFont(new Font("Serif", Font.PLAIN, 10)); assertEquals(plot1, plot2); plot1.setDrawBorder(true); assertFalse(plot1.equals(plot2)); plot2.setDrawBorder(true); assertEquals(plot1, plot2); plot1.setRosePaint(new GradientPaint(1.0f, 2.0f, Color.BLUE, 3.0f, 4.0f, Color.yellow)); assertFalse(plot1.equals(plot2)); plot2.setRosePaint(new GradientPaint(1.0f, 2.0f, Color.BLUE, 3.0f, 4.0f, Color.yellow)); assertEquals(plot1, plot2); plot1.setRoseCenterPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertFalse(plot1.equals(plot2)); plot2.setRoseCenterPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertEquals(plot1, plot2); plot1.setRoseHighlightPaint(new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f, Color.yellow)); assertFalse(plot1.equals(plot2)); plot2.setRoseHighlightPaint(new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f, Color.yellow)); assertEquals(plot1, plot2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompassPlot)) { return false; } if (!super.equals(obj)) { return false; } CompassPlot that = (CompassPlot) obj; if (this.labelType != that.labelType) { return false; } if (!ObjectUtilities.equal(this.labelFont, that.labelFont)) { return false; } if (this.drawBorder != that.drawBorder) { return false; } if (!PaintUtilities.equal(this.roseHighlightPaint, that.roseHighlightPaint)) { return false; } if (!PaintUtilities.equal(this.rosePaint, that.rosePaint)) { return false; } if (!PaintUtilities.equal(this.roseCenterPaint, that.roseCenterPaint)) { return false; } if (!ObjectUtilities.equal(this.compassFont, that.compassFont)) { return false; } if (!Arrays.equals(this.seriesNeedle, that.seriesNeedle)) { return false; } if (getRevolutionDistance() != that.getRevolutionDistance()) { return false; } return true; }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompassPlot)) { return false; } if (!super.equals(obj)) { return false; } CompassPlot that = (CompassPlot) obj; if (this.labelType != that.labelType) { return false; } if (!ObjectUtilities.equal(this.labelFont, that.labelFont)) { return false; } if (this.drawBorder != that.drawBorder) { return false; } if (!PaintUtilities.equal(this.roseHighlightPaint, that.roseHighlightPaint)) { return false; } if (!PaintUtilities.equal(this.rosePaint, that.rosePaint)) { return false; } if (!PaintUtilities.equal(this.roseCenterPaint, that.roseCenterPaint)) { return false; } if (!ObjectUtilities.equal(this.compassFont, that.compassFont)) { return false; } if (!Arrays.equals(this.seriesNeedle, that.seriesNeedle)) { return false; } if (getRevolutionDistance() != that.getRevolutionDistance()) { return false; } return true; } }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompassPlot)) { return false; } if (!super.equals(obj)) { return false; } CompassPlot that = (CompassPlot) obj; if (this.labelType != that.labelType) { return false; } if (!ObjectUtilities.equal(this.labelFont, that.labelFont)) { return false; } if (this.drawBorder != that.drawBorder) { return false; } if (!PaintUtilities.equal(this.roseHighlightPaint, that.roseHighlightPaint)) { return false; } if (!PaintUtilities.equal(this.rosePaint, that.rosePaint)) { return false; } if (!PaintUtilities.equal(this.roseCenterPaint, that.roseCenterPaint)) { return false; } if (!ObjectUtilities.equal(this.compassFont, that.compassFont)) { return false; } if (!Arrays.equals(this.seriesNeedle, that.seriesNeedle)) { return false; } if (getRevolutionDistance() != that.getRevolutionDistance()) { return false; } return true; } CompassPlot();  CompassPlot(ValueDataset dataset); }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompassPlot)) { return false; } if (!super.equals(obj)) { return false; } CompassPlot that = (CompassPlot) obj; if (this.labelType != that.labelType) { return false; } if (!ObjectUtilities.equal(this.labelFont, that.labelFont)) { return false; } if (this.drawBorder != that.drawBorder) { return false; } if (!PaintUtilities.equal(this.roseHighlightPaint, that.roseHighlightPaint)) { return false; } if (!PaintUtilities.equal(this.rosePaint, that.rosePaint)) { return false; } if (!PaintUtilities.equal(this.roseCenterPaint, that.roseCenterPaint)) { return false; } if (!ObjectUtilities.equal(this.compassFont, that.compassFont)) { return false; } if (!Arrays.equals(this.seriesNeedle, that.seriesNeedle)) { return false; } if (getRevolutionDistance() != that.getRevolutionDistance()) { return false; } return true; } CompassPlot();  CompassPlot(ValueDataset dataset); int getLabelType(); void setLabelType(int type); Font getLabelFont(); void setLabelFont(Font font); Paint getRosePaint(); void setRosePaint(Paint paint); Paint getRoseCenterPaint(); void setRoseCenterPaint(Paint paint); Paint getRoseHighlightPaint(); void setRoseHighlightPaint(Paint paint); boolean getDrawBorder(); void setDrawBorder(boolean status); void setSeriesPaint(int series, Paint paint); void setSeriesOutlinePaint(int series, Paint p); void setSeriesOutlineStroke(int series, Stroke stroke); void setSeriesNeedle(int type); void setSeriesNeedle(int index, int type); void setSeriesNeedle(int index, MeterNeedle needle); ValueDataset[] getDatasets(); void addDataset(ValueDataset dataset); void addDataset(ValueDataset dataset, MeterNeedle needle); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState,
                     PlotRenderingInfo info); @Override String getPlotType(); @Override List<LegendItem> getLegendItems(); @Override void zoom(double percent); @Override boolean equals(Object obj); @Override Object clone(); void setRevolutionDistance(double size); double getRevolutionDistance(); }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompassPlot)) { return false; } if (!super.equals(obj)) { return false; } CompassPlot that = (CompassPlot) obj; if (this.labelType != that.labelType) { return false; } if (!ObjectUtilities.equal(this.labelFont, that.labelFont)) { return false; } if (this.drawBorder != that.drawBorder) { return false; } if (!PaintUtilities.equal(this.roseHighlightPaint, that.roseHighlightPaint)) { return false; } if (!PaintUtilities.equal(this.rosePaint, that.rosePaint)) { return false; } if (!PaintUtilities.equal(this.roseCenterPaint, that.roseCenterPaint)) { return false; } if (!ObjectUtilities.equal(this.compassFont, that.compassFont)) { return false; } if (!Arrays.equals(this.seriesNeedle, that.seriesNeedle)) { return false; } if (getRevolutionDistance() != that.getRevolutionDistance()) { return false; } return true; } CompassPlot();  CompassPlot(ValueDataset dataset); int getLabelType(); void setLabelType(int type); Font getLabelFont(); void setLabelFont(Font font); Paint getRosePaint(); void setRosePaint(Paint paint); Paint getRoseCenterPaint(); void setRoseCenterPaint(Paint paint); Paint getRoseHighlightPaint(); void setRoseHighlightPaint(Paint paint); boolean getDrawBorder(); void setDrawBorder(boolean status); void setSeriesPaint(int series, Paint paint); void setSeriesOutlinePaint(int series, Paint p); void setSeriesOutlineStroke(int series, Stroke stroke); void setSeriesNeedle(int type); void setSeriesNeedle(int index, int type); void setSeriesNeedle(int index, MeterNeedle needle); ValueDataset[] getDatasets(); void addDataset(ValueDataset dataset); void addDataset(ValueDataset dataset, MeterNeedle needle); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState,
                     PlotRenderingInfo info); @Override String getPlotType(); @Override List<LegendItem> getLegendItems(); @Override void zoom(double percent); @Override boolean equals(Object obj); @Override Object clone(); void setRevolutionDistance(double size); double getRevolutionDistance(); static final Font DEFAULT_LABEL_FONT; static final int NO_LABELS; static final int VALUE_LABELS; }