@Test public void testEquals() { OHLCSeriesCollection c1 = new OHLCSeriesCollection(); OHLCSeriesCollection c2 = new OHLCSeriesCollection(); assertEquals(c1, c2); OHLCSeries s1 = new OHLCSeries("Series"); s1.add(new Year(2006), 1.0, 1.1, 1.2, 1.3); c1.addSeries(s1); assertFalse(c1.equals(c2)); OHLCSeries s2 = new OHLCSeries("Series"); s2.add(new Year(2006), 1.0, 1.1, 1.2, 1.3); c2.addSeries(s2); assertEquals(c1, c2); c1.addSeries(new OHLCSeries("Empty Series")); assertFalse(c1.equals(c2)); c2.addSeries(new OHLCSeries("Empty Series")); assertEquals(c1, c2); c1.setXPosition(TimePeriodAnchor.END); assertFalse(c1.equals(c2)); c2.setXPosition(TimePeriodAnchor.END); assertEquals(c1, c2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCSeriesCollection)) { return false; } OHLCSeriesCollection that = (OHLCSeriesCollection) obj; if (!this.xPosition.equals(that.xPosition)) { return false; } return ObjectUtilities.equal(this.data, that.data); }
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCSeriesCollection)) { return false; } OHLCSeriesCollection that = (OHLCSeriesCollection) obj; if (!this.xPosition.equals(that.xPosition)) { return false; } return ObjectUtilities.equal(this.data, that.data); } }
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCSeriesCollection)) { return false; } OHLCSeriesCollection that = (OHLCSeriesCollection) obj; if (!this.xPosition.equals(that.xPosition)) { return false; } return ObjectUtilities.equal(this.data, that.data); } OHLCSeriesCollection(); }
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCSeriesCollection)) { return false; } OHLCSeriesCollection that = (OHLCSeriesCollection) obj; if (!this.xPosition.equals(that.xPosition)) { return false; } return ObjectUtilities.equal(this.data, that.data); } OHLCSeriesCollection(); TimePeriodAnchor getXPosition(); void setXPosition(TimePeriodAnchor anchor); void addSeries(OHLCSeries series); @Override int getSeriesCount(); OHLCSeries getSeries(int series); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override Number getX(int series, int item); @Override Number getY(int series, int item); @Override double getOpenValue(int series, int item); @Override Number getOpen(int series, int item); @Override double getCloseValue(int series, int item); @Override Number getClose(int series, int item); @Override double getHighValue(int series, int item); @Override Number getHigh(int series, int item); @Override double getLowValue(int series, int item); @Override Number getLow(int series, int item); @Override Number getVolume(int series, int item); @Override double getVolumeValue(int series, int item); void removeSeries(int index); boolean removeSeries(OHLCSeries series); void removeAllSeries(); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCSeriesCollection)) { return false; } OHLCSeriesCollection that = (OHLCSeriesCollection) obj; if (!this.xPosition.equals(that.xPosition)) { return false; } return ObjectUtilities.equal(this.data, that.data); } OHLCSeriesCollection(); TimePeriodAnchor getXPosition(); void setXPosition(TimePeriodAnchor anchor); void addSeries(OHLCSeries series); @Override int getSeriesCount(); OHLCSeries getSeries(int series); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override Number getX(int series, int item); @Override Number getY(int series, int item); @Override double getOpenValue(int series, int item); @Override Number getOpen(int series, int item); @Override double getCloseValue(int series, int item); @Override Number getClose(int series, int item); @Override double getHighValue(int series, int item); @Override Number getHigh(int series, int item); @Override double getLowValue(int series, int item); @Override Number getLow(int series, int item); @Override Number getVolume(int series, int item); @Override double getVolumeValue(int series, int item); void removeSeries(int index); boolean removeSeries(OHLCSeries series); void removeAllSeries(); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }