@Test public void testHashcode() { OHLCSeriesCollection c1 = new OHLCSeriesCollection(); OHLCSeries s1 = new OHLCSeries("S"); s1.add(new Year(2009), 1.0, 4.0, 0.5, 2.0); c1.addSeries(s1); OHLCSeriesCollection c2 = new OHLCSeriesCollection(); OHLCSeries s2 = new OHLCSeries("S"); s2.add(new Year(2009), 1.0, 4.0, 0.5, 2.0); c2.addSeries(s2); assertEquals(c1, c2); int h1 = c1.hashCode(); int h2 = c2.hashCode(); assertEquals(h1, h2); }
@Override public int hashCode() { int result = 137; result = HashUtilities.hashCode(result, this.xPosition); for (OHLCSeries aData : this.data) { result = HashUtilities.hashCode(result, aData); } return result; }
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { @Override public int hashCode() { int result = 137; result = HashUtilities.hashCode(result, this.xPosition); for (OHLCSeries aData : this.data) { result = HashUtilities.hashCode(result, aData); } return result; } }
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { @Override public int hashCode() { int result = 137; result = HashUtilities.hashCode(result, this.xPosition); for (OHLCSeries aData : this.data) { result = HashUtilities.hashCode(result, aData); } return result; } OHLCSeriesCollection(); }
OHLCSeriesCollection extends AbstractXYDataset implements OHLCDataset, Serializable { @Override public int hashCode() { int result = 137; result = HashUtilities.hashCode(result, this.xPosition); for (OHLCSeries aData : this.data) { result = HashUtilities.hashCode(result, aData); } return result; } 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 int hashCode() { int result = 137; result = HashUtilities.hashCode(result, this.xPosition); for (OHLCSeries aData : this.data) { result = HashUtilities.hashCode(result, aData); } return result; } 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();  }