@Test public void testEquals() { DefaultOHLCDataset d1 = new DefaultOHLCDataset("Series 1", new OHLCDataItem[0]); DefaultOHLCDataset d2 = new DefaultOHLCDataset("Series 1", new OHLCDataItem[0]); assertEquals(d1, d2); assertEquals(d2, d1); d1 = new DefaultOHLCDataset("Series 2", new OHLCDataItem[0]); assertFalse(d1.equals(d2)); d2 = new DefaultOHLCDataset("Series 2", new OHLCDataItem[0]); assertEquals(d1, d2); d1 = new DefaultOHLCDataset("Series 2", new OHLCDataItem[] { new OHLCDataItem(new Date(123L), 1.2, 3.4, 5.6, 7.8, 99.9)}); assertFalse(d1.equals(d2)); d2 = new DefaultOHLCDataset("Series 2", new OHLCDataItem[] { new OHLCDataItem(new Date(123L), 1.2, 3.4, 5.6, 7.8, 99.9)}); assertEquals(d1, d2); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DefaultOHLCDataset)) { return false; } DefaultOHLCDataset that = (DefaultOHLCDataset) obj; if (!this.key.equals(that.key)) { return false; } if (!Arrays.equals(this.data, that.data)) { return false; } return true; }
DefaultOHLCDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DefaultOHLCDataset)) { return false; } DefaultOHLCDataset that = (DefaultOHLCDataset) obj; if (!this.key.equals(that.key)) { return false; } if (!Arrays.equals(this.data, that.data)) { return false; } return true; } }
DefaultOHLCDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DefaultOHLCDataset)) { return false; } DefaultOHLCDataset that = (DefaultOHLCDataset) obj; if (!this.key.equals(that.key)) { return false; } if (!Arrays.equals(this.data, that.data)) { return false; } return true; } DefaultOHLCDataset(Comparable key, OHLCDataItem[] data); }
DefaultOHLCDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DefaultOHLCDataset)) { return false; } DefaultOHLCDataset that = (DefaultOHLCDataset) obj; if (!this.key.equals(that.key)) { return false; } if (!Arrays.equals(this.data, that.data)) { return false; } return true; } DefaultOHLCDataset(Comparable key, OHLCDataItem[] data); @Override Comparable getSeriesKey(int series); @Override Number getX(int series, int item); Date getXDate(int series, int item); @Override Number getY(int series, int item); @Override Number getHigh(int series, int item); @Override double getHighValue(int series, int item); @Override Number getLow(int series, int item); @Override double getLowValue(int series, int item); @Override Number getOpen(int series, int item); @Override double getOpenValue(int series, int item); @Override Number getClose(int series, int item); @Override double getCloseValue(int series, int item); @Override Number getVolume(int series, int item); @Override double getVolumeValue(int series, int item); @Override int getSeriesCount(); @Override int getItemCount(int series); void sortDataByDate(); @Override boolean equals(Object obj); @Override Object clone(); }
DefaultOHLCDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DefaultOHLCDataset)) { return false; } DefaultOHLCDataset that = (DefaultOHLCDataset) obj; if (!this.key.equals(that.key)) { return false; } if (!Arrays.equals(this.data, that.data)) { return false; } return true; } DefaultOHLCDataset(Comparable key, OHLCDataItem[] data); @Override Comparable getSeriesKey(int series); @Override Number getX(int series, int item); Date getXDate(int series, int item); @Override Number getY(int series, int item); @Override Number getHigh(int series, int item); @Override double getHighValue(int series, int item); @Override Number getLow(int series, int item); @Override double getLowValue(int series, int item); @Override Number getOpen(int series, int item); @Override double getOpenValue(int series, int item); @Override Number getClose(int series, int item); @Override double getCloseValue(int series, int item); @Override Number getVolume(int series, int item); @Override double getVolumeValue(int series, int item); @Override int getSeriesCount(); @Override int getItemCount(int series); void sortDataByDate(); @Override boolean equals(Object obj); @Override Object clone();  }