@Test public void testEquals() { XYItemEntity e1 = new XYItemEntity(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), new TimeSeriesCollection(), 1, 9, "ToolTip", "URL"); XYItemEntity e2 = new XYItemEntity(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), new TimeSeriesCollection(), 1, 9, "ToolTip", "URL"); assertEquals(e1, e2); e1.setArea(new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0)); assertFalse(e1.equals(e2)); e2.setArea(new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0)); assertEquals(e1, e2); e1.setToolTipText("New ToolTip"); assertFalse(e1.equals(e2)); e2.setToolTipText("New ToolTip"); assertEquals(e1, e2); e1.setURLText("New URL"); assertFalse(e1.equals(e2)); e2.setURLText("New URL"); assertEquals(e1, e2); e1.setSeriesIndex(88); assertFalse(e1.equals(e2)); e2.setSeriesIndex(88); assertEquals(e1, e2); e1.setItem(88); assertFalse(e1.equals(e2)); e2.setItem(88); assertEquals(e1, e2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof XYItemEntity && super.equals(obj)) { XYItemEntity ie = (XYItemEntity) obj; if (this.series != ie.series) { return false; } if (this.item != ie.item) { return false; } return true; } return false; }
XYItemEntity extends DataItemEntity { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof XYItemEntity && super.equals(obj)) { XYItemEntity ie = (XYItemEntity) obj; if (this.series != ie.series) { return false; } if (this.item != ie.item) { return false; } return true; } return false; } }
XYItemEntity extends DataItemEntity { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof XYItemEntity && super.equals(obj)) { XYItemEntity ie = (XYItemEntity) obj; if (this.series != ie.series) { return false; } if (this.item != ie.item) { return false; } return true; } return false; } XYItemEntity(Shape area, XYDataset dataset, int series, int item,
                        String toolTipText, String urlText); }
XYItemEntity extends DataItemEntity { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof XYItemEntity && super.equals(obj)) { XYItemEntity ie = (XYItemEntity) obj; if (this.series != ie.series) { return false; } if (this.item != ie.item) { return false; } return true; } return false; } XYItemEntity(Shape area, XYDataset dataset, int series, int item,
                        String toolTipText, String urlText); XYDataset getDataset(); Dataset getGeneralDataset(); void setDataset(XYDataset dataset); int getSeriesIndex(); void setSeriesIndex(int series); int getItem(); void setItem(int item); @Override boolean equals(Object obj); @Override String toString(); @Override DatasetCursor getItemCursor(); }
XYItemEntity extends DataItemEntity { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof XYItemEntity && super.equals(obj)) { XYItemEntity ie = (XYItemEntity) obj; if (this.series != ie.series) { return false; } if (this.item != ie.item) { return false; } return true; } return false; } XYItemEntity(Shape area, XYDataset dataset, int series, int item,
                        String toolTipText, String urlText); XYDataset getDataset(); Dataset getGeneralDataset(); void setDataset(XYDataset dataset); int getSeriesIndex(); void setSeriesIndex(int series); int getItem(); void setItem(int item); @Override boolean equals(Object obj); @Override String toString(); @Override DatasetCursor getItemCursor();  }