@Test public void testEquals() { OHLCDataItem i1 = new OHLCDataItem( new Date(1L), 1.0, 2.0, 3.0, 4.0, 5.0 ); OHLCDataItem i2 = new OHLCDataItem( new Date(1L), 1.0, 2.0, 3.0, 4.0, 5.0 ); assertEquals(i1, i2); assertEquals(i2, i1); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCDataItem)) { return false; } OHLCDataItem that = (OHLCDataItem) obj; if (!this.date.equals(that.date)) { return false; } if (!this.high.equals(that.high)) { return false; } if (!this.low.equals(that.low)) { return false; } if (!this.open.equals(that.open)) { return false; } if (!this.close.equals(that.close)) { return false; } return true; }
OHLCDataItem implements Comparable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCDataItem)) { return false; } OHLCDataItem that = (OHLCDataItem) obj; if (!this.date.equals(that.date)) { return false; } if (!this.high.equals(that.high)) { return false; } if (!this.low.equals(that.low)) { return false; } if (!this.open.equals(that.open)) { return false; } if (!this.close.equals(that.close)) { return false; } return true; } }
OHLCDataItem implements Comparable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCDataItem)) { return false; } OHLCDataItem that = (OHLCDataItem) obj; if (!this.date.equals(that.date)) { return false; } if (!this.high.equals(that.high)) { return false; } if (!this.low.equals(that.low)) { return false; } if (!this.open.equals(that.open)) { return false; } if (!this.close.equals(that.close)) { return false; } return true; } OHLCDataItem(Date date,
                        double open,
                        double high,
                        double low,
                        double close,
                        double volume); }
OHLCDataItem implements Comparable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCDataItem)) { return false; } OHLCDataItem that = (OHLCDataItem) obj; if (!this.date.equals(that.date)) { return false; } if (!this.high.equals(that.high)) { return false; } if (!this.low.equals(that.low)) { return false; } if (!this.open.equals(that.open)) { return false; } if (!this.close.equals(that.close)) { return false; } return true; } OHLCDataItem(Date date,
                        double open,
                        double high,
                        double low,
                        double close,
                        double volume); Date getDate(); Number getOpen(); Number getHigh(); Number getLow(); Number getClose(); Number getVolume(); @Override boolean equals(Object obj); @Override int compareTo(Object object); }
OHLCDataItem implements Comparable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLCDataItem)) { return false; } OHLCDataItem that = (OHLCDataItem) obj; if (!this.date.equals(that.date)) { return false; } if (!this.high.equals(that.high)) { return false; } if (!this.low.equals(that.low)) { return false; } if (!this.open.equals(that.open)) { return false; } if (!this.close.equals(that.close)) { return false; } return true; } OHLCDataItem(Date date,
                        double open,
                        double high,
                        double low,
                        double close,
                        double volume); Date getDate(); Number getOpen(); Number getHigh(); Number getLow(); Number getClose(); Number getVolume(); @Override boolean equals(Object obj); @Override int compareTo(Object object);  }