@Test public void testEquals() { TaskSeries s1 = new TaskSeries("Series"); s1.add(new Task("Task 1", new Date(0L), new Date(1L))); s1.add(new Task("Task 2", new Date(10L), new Date(11L))); s1.add(new Task("Task 3", new Date(20L), new Date(21L))); TaskSeriesCollection u1 = new TaskSeriesCollection(); u1.add(s1); XYTaskDataset d1 = new XYTaskDataset(u1); TaskSeries s2 = new TaskSeries("Series"); s2.add(new Task("Task 1", new Date(0L), new Date(1L))); s2.add(new Task("Task 2", new Date(10L), new Date(11L))); s2.add(new Task("Task 3", new Date(20L), new Date(21L))); TaskSeriesCollection u2 = new TaskSeriesCollection(); u2.add(s2); XYTaskDataset d2 = new XYTaskDataset(u2); assertEquals(d1, d2); d1.setSeriesWidth(0.123); assertFalse(d1.equals(d2)); d2.setSeriesWidth(0.123); assertEquals(d1, d2); d1.setTransposed(true); assertFalse(d1.equals(d2)); d2.setTransposed(true); assertEquals(d1, d2); s1.add(new Task("Task 2", new Date(10L), new Date(11L))); assertFalse(d1.equals(d2)); s2.add(new Task("Task 2", new Date(10L), new Date(11L))); assertEquals(d1, d2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYTaskDataset)) { return false; } XYTaskDataset that = (XYTaskDataset) obj; if (this.seriesWidth != that.seriesWidth) { return false; } if (this.transposed != that.transposed) { return false; } if (!this.underlying.equals(that.underlying)) { return false; } return true; }
XYTaskDataset extends AbstractXYDataset implements IntervalXYDataset, DatasetChangeListener { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYTaskDataset)) { return false; } XYTaskDataset that = (XYTaskDataset) obj; if (this.seriesWidth != that.seriesWidth) { return false; } if (this.transposed != that.transposed) { return false; } if (!this.underlying.equals(that.underlying)) { return false; } return true; } }
XYTaskDataset extends AbstractXYDataset implements IntervalXYDataset, DatasetChangeListener { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYTaskDataset)) { return false; } XYTaskDataset that = (XYTaskDataset) obj; if (this.seriesWidth != that.seriesWidth) { return false; } if (this.transposed != that.transposed) { return false; } if (!this.underlying.equals(that.underlying)) { return false; } return true; } XYTaskDataset(TaskSeriesCollection tasks); }
XYTaskDataset extends AbstractXYDataset implements IntervalXYDataset, DatasetChangeListener { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYTaskDataset)) { return false; } XYTaskDataset that = (XYTaskDataset) obj; if (this.seriesWidth != that.seriesWidth) { return false; } if (this.transposed != that.transposed) { return false; } if (!this.underlying.equals(that.underlying)) { return false; } return true; } XYTaskDataset(TaskSeriesCollection tasks); TaskSeriesCollection getTasks(); double getSeriesWidth(); void setSeriesWidth(double w); boolean isTransposed(); void setTransposed(boolean transposed); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override double getStartXValue(int series, int item); @Override double getEndXValue(int series, int item); @Override Number getX(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override double getYValue(int series, int item); @Override double getStartYValue(int series, int item); @Override double getEndYValue(int series, int item); @Override Number getY(int series, int item); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); @Override void datasetChanged(DatasetChangeEvent event); @Override boolean equals(Object obj); @Override Object clone(); }
XYTaskDataset extends AbstractXYDataset implements IntervalXYDataset, DatasetChangeListener { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYTaskDataset)) { return false; } XYTaskDataset that = (XYTaskDataset) obj; if (this.seriesWidth != that.seriesWidth) { return false; } if (this.transposed != that.transposed) { return false; } if (!this.underlying.equals(that.underlying)) { return false; } return true; } XYTaskDataset(TaskSeriesCollection tasks); TaskSeriesCollection getTasks(); double getSeriesWidth(); void setSeriesWidth(double w); boolean isTransposed(); void setTransposed(boolean transposed); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override double getStartXValue(int series, int item); @Override double getEndXValue(int series, int item); @Override Number getX(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override double getYValue(int series, int item); @Override double getStartYValue(int series, int item); @Override double getEndYValue(int series, int item); @Override Number getY(int series, int item); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); @Override void datasetChanged(DatasetChangeEvent event); @Override boolean equals(Object obj); @Override Object clone();  }