@Test public void testEquals() { OHLC i1 = new OHLC(2.0, 4.0, 1.0, 3.0); OHLC i2 = new OHLC(2.0, 4.0, 1.0, 3.0); assertEquals(i1, i2); i1 = new OHLC(2.2, 4.0, 1.0, 3.0); assertFalse(i1.equals(i2)); i2 = new OHLC(2.2, 4.0, 1.0, 3.0); assertEquals(i1, i2); i1 = new OHLC(2.2, 4.4, 1.0, 3.0); assertFalse(i1.equals(i2)); i2 = new OHLC(2.2, 4.4, 1.0, 3.0); assertEquals(i1, i2); i1 = new OHLC(2.2, 4.4, 1.1, 3.0); assertFalse(i1.equals(i2)); i2 = new OHLC(2.2, 4.4, 1.1, 3.0); assertEquals(i1, i2); i1 = new OHLC(2.2, 4.4, 1.1, 3.3); assertFalse(i1.equals(i2)); i2 = new OHLC(2.2, 4.4, 1.1, 3.3); assertEquals(i1, i2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLC)) { return false; } OHLC that = (OHLC) obj; if (this.open != that.open) { return false; } if (this.close != that.close) { return false; } if (this.high != that.high) { return false; } if (this.low != that.low) { return false; } return true; }
OHLC implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLC)) { return false; } OHLC that = (OHLC) obj; if (this.open != that.open) { return false; } if (this.close != that.close) { return false; } if (this.high != that.high) { return false; } if (this.low != that.low) { return false; } return true; } }
OHLC implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLC)) { return false; } OHLC that = (OHLC) obj; if (this.open != that.open) { return false; } if (this.close != that.close) { return false; } if (this.high != that.high) { return false; } if (this.low != that.low) { return false; } return true; } OHLC(double open, double high, double low, double close); }
OHLC implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLC)) { return false; } OHLC that = (OHLC) obj; if (this.open != that.open) { return false; } if (this.close != that.close) { return false; } if (this.high != that.high) { return false; } if (this.low != that.low) { return false; } return true; } OHLC(double open, double high, double low, double close); double getOpen(); double getClose(); double getHigh(); double getLow(); @Override boolean equals(Object obj); @Override int hashCode(); }
OHLC implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof OHLC)) { return false; } OHLC that = (OHLC) obj; if (this.open != that.open) { return false; } if (this.close != that.close) { return false; } if (this.high != that.high) { return false; } if (this.low != that.low) { return false; } return true; } OHLC(double open, double high, double low, double close); double getOpen(); double getClose(); double getHigh(); double getLow(); @Override boolean equals(Object obj); @Override int hashCode();  }