@Test public void testEquals() { LineRenderer3D r1 = new LineRenderer3D(); LineRenderer3D r2 = new LineRenderer3D(); assertEquals(r1, r2); r1.setXOffset(99.9); assertFalse(r1.equals(r2)); r2.setXOffset(99.9); assertEquals(r1, r2); r1.setYOffset(111.1); assertFalse(r1.equals(r2)); r2.setYOffset(111.1); assertEquals(r1, r2); r1.setWallPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertFalse(r1.equals(r2)); r2.setWallPaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertEquals(r1, r2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineRenderer3D)) { return false; } LineRenderer3D that = (LineRenderer3D) obj; if (this.xOffset != that.xOffset) { return false; } if (this.yOffset != that.yOffset) { return false; } if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) { return false; } return super.equals(obj); }
LineRenderer3D extends LineAndShapeRenderer implements Effect3D, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineRenderer3D)) { return false; } LineRenderer3D that = (LineRenderer3D) obj; if (this.xOffset != that.xOffset) { return false; } if (this.yOffset != that.yOffset) { return false; } if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) { return false; } return super.equals(obj); } }
LineRenderer3D extends LineAndShapeRenderer implements Effect3D, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineRenderer3D)) { return false; } LineRenderer3D that = (LineRenderer3D) obj; if (this.xOffset != that.xOffset) { return false; } if (this.yOffset != that.yOffset) { return false; } if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) { return false; } return super.equals(obj); } LineRenderer3D(); }
LineRenderer3D extends LineAndShapeRenderer implements Effect3D, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineRenderer3D)) { return false; } LineRenderer3D that = (LineRenderer3D) obj; if (this.xOffset != that.xOffset) { return false; } if (this.yOffset != that.yOffset) { return false; } if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) { return false; } return super.equals(obj); } LineRenderer3D(); @Override double getXOffset(); @Override double getYOffset(); void setXOffset(double xOffset); void setYOffset(double yOffset); Paint getWallPaint(); void setWallPaint(Paint paint); @Override void drawBackground(Graphics2D g2, CategoryPlot plot,
                               Rectangle2D dataArea); @Override void drawOutline(Graphics2D g2, CategoryPlot plot,
                            Rectangle2D dataArea); @Override void drawDomainGridline(Graphics2D g2,
                                   CategoryPlot plot,
                                   Rectangle2D dataArea,
                                   double value); @Override void drawRangeGridline(Graphics2D g2,
                                  CategoryPlot plot,
                                  ValueAxis axis,
                                  Rectangle2D dataArea,
                                  double value); @Override void drawRangeMarker(Graphics2D g2,
                                CategoryPlot plot,
                                ValueAxis axis,
                                Marker marker,
                                Rectangle2D dataArea); @Override void drawItem(Graphics2D g2,
                         CategoryItemRendererState state,
                         Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset dataset,
                         int row,
                         int column,
                         int pass); @Override boolean equals(Object obj); }
LineRenderer3D extends LineAndShapeRenderer implements Effect3D, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineRenderer3D)) { return false; } LineRenderer3D that = (LineRenderer3D) obj; if (this.xOffset != that.xOffset) { return false; } if (this.yOffset != that.yOffset) { return false; } if (!PaintUtilities.equal(this.wallPaint, that.wallPaint)) { return false; } return super.equals(obj); } LineRenderer3D(); @Override double getXOffset(); @Override double getYOffset(); void setXOffset(double xOffset); void setYOffset(double yOffset); Paint getWallPaint(); void setWallPaint(Paint paint); @Override void drawBackground(Graphics2D g2, CategoryPlot plot,
                               Rectangle2D dataArea); @Override void drawOutline(Graphics2D g2, CategoryPlot plot,
                            Rectangle2D dataArea); @Override void drawDomainGridline(Graphics2D g2,
                                   CategoryPlot plot,
                                   Rectangle2D dataArea,
                                   double value); @Override void drawRangeGridline(Graphics2D g2,
                                  CategoryPlot plot,
                                  ValueAxis axis,
                                  Rectangle2D dataArea,
                                  double value); @Override void drawRangeMarker(Graphics2D g2,
                                CategoryPlot plot,
                                ValueAxis axis,
                                Marker marker,
                                Rectangle2D dataArea); @Override void drawItem(Graphics2D g2,
                         CategoryItemRendererState state,
                         Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset dataset,
                         int row,
                         int column,
                         int pass); @Override boolean equals(Object obj); static final double DEFAULT_X_OFFSET; static final double DEFAULT_Y_OFFSET; static final Paint DEFAULT_WALL_PAINT; }