@Test public void testEquals() { DefaultXYDataset d1 = new DefaultXYDataset(); double[] x1 = new double[] {1.0, 2.0, 3.0}; double[] y1 = new double[] {4.0, 5.0, 6.0}; double[][] data1 = new double[][] {x1, y1}; d1.addSeries("S1", data1); DefaultXYDataset d2 = new DefaultXYDataset(); double[] x2 = new double[] {1.0, 2.0, 3.0}; double[] y2 = new double[] {4.0, 5.0, 6.0}; double[][] data2 = new double[][] {x2, y2}; d2.addSeries("S1", data2); XYBarDataset bd1 = new XYBarDataset(d1, 5.0); XYBarDataset bd2 = new XYBarDataset(d2, 5.0); assertEquals(bd1, bd2); assertEquals(bd2, bd1); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYBarDataset)) { return false; } XYBarDataset that = (XYBarDataset) obj; if (!this.underlying.equals(that.underlying)) { return false; } if (this.barWidth != that.barWidth) { return false; } return true; }
XYBarDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, DatasetChangeListener, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYBarDataset)) { return false; } XYBarDataset that = (XYBarDataset) obj; if (!this.underlying.equals(that.underlying)) { return false; } if (this.barWidth != that.barWidth) { return false; } return true; } }
XYBarDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, DatasetChangeListener, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYBarDataset)) { return false; } XYBarDataset that = (XYBarDataset) obj; if (!this.underlying.equals(that.underlying)) { return false; } if (this.barWidth != that.barWidth) { return false; } return true; } XYBarDataset(XYDataset underlying, double barWidth); }
XYBarDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, DatasetChangeListener, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYBarDataset)) { return false; } XYBarDataset that = (XYBarDataset) obj; if (!this.underlying.equals(that.underlying)) { return false; } if (this.barWidth != that.barWidth) { return false; } return true; } XYBarDataset(XYDataset underlying, double barWidth); XYDataset getUnderlyingDataset(); double getBarWidth(); void setBarWidth(double barWidth); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override double getXValue(int series, int item); @Override Number getY(int series, int item); @Override double getYValue(int series, int item); @Override Number getStartX(int series, int item); @Override double getStartXValue(int series, int item); @Override Number getEndX(int series, int item); @Override double getEndXValue(int series, int item); @Override Number getStartY(int series, int item); @Override double getStartYValue(int series, int item); @Override Number getEndY(int series, int item); @Override double getEndYValue(int series, int item); @Override void datasetChanged(DatasetChangeEvent event); @Override boolean equals(Object obj); @Override Object clone(); }
XYBarDataset extends AbstractIntervalXYDataset implements IntervalXYDataset, DatasetChangeListener, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYBarDataset)) { return false; } XYBarDataset that = (XYBarDataset) obj; if (!this.underlying.equals(that.underlying)) { return false; } if (this.barWidth != that.barWidth) { return false; } return true; } XYBarDataset(XYDataset underlying, double barWidth); XYDataset getUnderlyingDataset(); double getBarWidth(); void setBarWidth(double barWidth); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override double getXValue(int series, int item); @Override Number getY(int series, int item); @Override double getYValue(int series, int item); @Override Number getStartX(int series, int item); @Override double getStartXValue(int series, int item); @Override Number getEndX(int series, int item); @Override double getEndXValue(int series, int item); @Override Number getStartY(int series, int item); @Override double getStartYValue(int series, int item); @Override Number getEndY(int series, int item); @Override double getEndYValue(int series, int item); @Override void datasetChanged(DatasetChangeEvent event); @Override boolean equals(Object obj); @Override Object clone();  }