@Test public void testEquals() { DefaultHighLowDataset d1 = new DefaultHighLowDataset("Series 1", new Date[0], new double[0], new double[0], new double[0], new double[0], new double[0]); DefaultHighLowDataset d2 = new DefaultHighLowDataset("Series 1", new Date[0], new double[0], new double[0], new double[0], new double[0], new double[0]); assertEquals(d1, d2); assertEquals(d2, d1); d1 = new DefaultHighLowDataset("Series 2", new Date[0], new double[0], new double[0], new double[0], new double[0], new double[0]); assertFalse(d1.equals(d2)); d2 = new DefaultHighLowDataset("Series 2", new Date[0], new double[0], new double[0], new double[0], new double[0], new double[0]); assertEquals(d1, d2); d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[1], new double[1], new double[1], new double[1], new double[1]); assertFalse(d1.equals(d2)); d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[1], new double[1], new double[1], new double[1], new double[1]); assertEquals(d1, d2); d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[1], new double[1], new double[1], new double[1]); assertFalse(d1.equals(d2)); d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[1], new double[1], new double[1], new double[1]); assertEquals(d1, d2); d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[1], new double[1], new double[1]); assertFalse(d1.equals(d2)); d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[1], new double[1], new double[1]); assertEquals(d1, d2); d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[1], new double[1]); assertFalse(d1.equals(d2)); d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[1], new double[1]); assertEquals(d1, d2); d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[] {7.8}, new double[1]); assertFalse(d1.equals(d2)); d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[] {7.8}, new double[1]); assertEquals(d1, d2); d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[] {7.8}, new double[] {99.9}); assertFalse(d1.equals(d2)); d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[] {7.8}, new double[] {99.9}); assertEquals(d1, d2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHighLowDataset)) { return false; } DefaultHighLowDataset that = (DefaultHighLowDataset) obj; if (!this.seriesKey.equals(that.seriesKey)) { return false; } if (!Arrays.equals(this.date, that.date)) { return false; } if (!Arrays.equals(this.open, that.open)) { return false; } if (!Arrays.equals(this.high, that.high)) { return false; } if (!Arrays.equals(this.low, that.low)) { return false; } if (!Arrays.equals(this.close, that.close)) { return false; } if (!Arrays.equals(this.volume, that.volume)) { return false; } return true; }
DefaultHighLowDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHighLowDataset)) { return false; } DefaultHighLowDataset that = (DefaultHighLowDataset) obj; if (!this.seriesKey.equals(that.seriesKey)) { return false; } if (!Arrays.equals(this.date, that.date)) { return false; } if (!Arrays.equals(this.open, that.open)) { return false; } if (!Arrays.equals(this.high, that.high)) { return false; } if (!Arrays.equals(this.low, that.low)) { return false; } if (!Arrays.equals(this.close, that.close)) { return false; } if (!Arrays.equals(this.volume, that.volume)) { return false; } return true; } }
DefaultHighLowDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHighLowDataset)) { return false; } DefaultHighLowDataset that = (DefaultHighLowDataset) obj; if (!this.seriesKey.equals(that.seriesKey)) { return false; } if (!Arrays.equals(this.date, that.date)) { return false; } if (!Arrays.equals(this.open, that.open)) { return false; } if (!Arrays.equals(this.high, that.high)) { return false; } if (!Arrays.equals(this.low, that.low)) { return false; } if (!Arrays.equals(this.close, that.close)) { return false; } if (!Arrays.equals(this.volume, that.volume)) { return false; } return true; } DefaultHighLowDataset(Comparable seriesKey, Date[] date,
            double[] high, double[] low, double[] open, double[] close,
            double[] volume); }
DefaultHighLowDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHighLowDataset)) { return false; } DefaultHighLowDataset that = (DefaultHighLowDataset) obj; if (!this.seriesKey.equals(that.seriesKey)) { return false; } if (!Arrays.equals(this.date, that.date)) { return false; } if (!Arrays.equals(this.open, that.open)) { return false; } if (!Arrays.equals(this.high, that.high)) { return false; } if (!Arrays.equals(this.low, that.low)) { return false; } if (!Arrays.equals(this.close, that.close)) { return false; } if (!Arrays.equals(this.volume, that.volume)) { return false; } return true; } DefaultHighLowDataset(Comparable seriesKey, Date[] date,
            double[] high, double[] low, double[] open, double[] close,
            double[] volume); @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); @Override boolean equals(Object obj); static Number[] createNumberArray(double[] data); }
DefaultHighLowDataset extends AbstractXYDataset implements OHLCDataset, PublicCloneable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHighLowDataset)) { return false; } DefaultHighLowDataset that = (DefaultHighLowDataset) obj; if (!this.seriesKey.equals(that.seriesKey)) { return false; } if (!Arrays.equals(this.date, that.date)) { return false; } if (!Arrays.equals(this.open, that.open)) { return false; } if (!Arrays.equals(this.high, that.high)) { return false; } if (!Arrays.equals(this.low, that.low)) { return false; } if (!Arrays.equals(this.close, that.close)) { return false; } if (!Arrays.equals(this.volume, that.volume)) { return false; } return true; } DefaultHighLowDataset(Comparable seriesKey, Date[] date,
            double[] high, double[] low, double[] open, double[] close,
            double[] volume); @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); @Override boolean equals(Object obj); static Number[] createNumberArray(double[] data);  }