@Test public void testHashcode() { OHLCSeries s1 = new OHLCSeries("Test"); s1.add(new Year(2009), 1.0, 3.0, 2.0, 1.4); OHLCSeries s2 = new OHLCSeries("Test"); s2.add(new Year(2009), 1.0, 3.0, 2.0, 1.4); assertEquals(s1, s2); int h1 = s1.hashCode(); int h2 = s2.hashCode(); assertEquals(h1, h2); }
public void add(RegularTimePeriod period, double open, double high, double low, double close) { if (getItemCount() > 0) { OHLCItem item0 = (OHLCItem) this.getDataItem(0); if (!period.getClass().equals(item0.getPeriod().getClass())) { throw new IllegalArgumentException( "Can't mix RegularTimePeriod class types."); } } super.add(new OHLCItem(period, open, high, low, close), true); }
OHLCSeries extends ComparableObjectSeries { public void add(RegularTimePeriod period, double open, double high, double low, double close) { if (getItemCount() > 0) { OHLCItem item0 = (OHLCItem) this.getDataItem(0); if (!period.getClass().equals(item0.getPeriod().getClass())) { throw new IllegalArgumentException( "Can't mix RegularTimePeriod class types."); } } super.add(new OHLCItem(period, open, high, low, close), true); } }
OHLCSeries extends ComparableObjectSeries { public void add(RegularTimePeriod period, double open, double high, double low, double close) { if (getItemCount() > 0) { OHLCItem item0 = (OHLCItem) this.getDataItem(0); if (!period.getClass().equals(item0.getPeriod().getClass())) { throw new IllegalArgumentException( "Can't mix RegularTimePeriod class types."); } } super.add(new OHLCItem(period, open, high, low, close), true); } OHLCSeries(Comparable key); }
OHLCSeries extends ComparableObjectSeries { public void add(RegularTimePeriod period, double open, double high, double low, double close) { if (getItemCount() > 0) { OHLCItem item0 = (OHLCItem) this.getDataItem(0); if (!period.getClass().equals(item0.getPeriod().getClass())) { throw new IllegalArgumentException( "Can't mix RegularTimePeriod class types."); } } super.add(new OHLCItem(period, open, high, low, close), true); } OHLCSeries(Comparable key); RegularTimePeriod getPeriod(int index); @Override ComparableObjectItem getDataItem(int index); void add(RegularTimePeriod period, double open, double high,
            double low, double close); void add(OHLCItem item); @Override ComparableObjectItem remove(int index); }
OHLCSeries extends ComparableObjectSeries { public void add(RegularTimePeriod period, double open, double high, double low, double close) { if (getItemCount() > 0) { OHLCItem item0 = (OHLCItem) this.getDataItem(0); if (!period.getClass().equals(item0.getPeriod().getClass())) { throw new IllegalArgumentException( "Can't mix RegularTimePeriod class types."); } } super.add(new OHLCItem(period, open, high, low, close), true); } OHLCSeries(Comparable key); RegularTimePeriod getPeriod(int index); @Override ComparableObjectItem getDataItem(int index); void add(RegularTimePeriod period, double open, double high,
            double low, double close); void add(OHLCItem item); @Override ComparableObjectItem remove(int index);  }