@Test public void testEquals() { DeltaLong dl0 = DeltaLong.valueOf(null, 123); DeltaLong dl0b = DeltaLong.valueOf(null, 123); DeltaLong dl1 = DeltaLong.valueOf(Long.valueOf(100), 123); DeltaLong dl1b = DeltaLong.valueOf(Long.valueOf(100), 123); DeltaLong dl2 = DeltaLong.valueOf(Long.valueOf(0), 223); DeltaLong dl2b = DeltaLong.valueOf(Long.valueOf(0), 223); assertEquals(dl1.longValue(), dl2.longValue()); assertEquals(dl0, dl0); assertEquals(dl0, dl0b); assertEquals(dl1, dl1); assertEquals(dl1, dl1b); assertEquals(dl2, dl2); assertEquals(dl2, dl2b); assertFalse(dl0.equals(dl1)); assertFalse(dl0.equals(dl2)); assertFalse(dl1.equals(dl0)); assertFalse(dl1.equals(dl2)); assertFalse(dl2.equals(dl0)); assertFalse(dl2.equals(dl1)); }
@Override public boolean equals(Object obj) { if (obj instanceof DeltaLong) { DeltaLong dl = (DeltaLong) obj; if (delta != dl.delta) { return false; } return base == null ? dl.base == null : base.equals(dl.base); } return false; }
DeltaLong extends Delta { @Override public boolean equals(Object obj) { if (obj instanceof DeltaLong) { DeltaLong dl = (DeltaLong) obj; if (delta != dl.delta) { return false; } return base == null ? dl.base == null : base.equals(dl.base); } return false; } }
DeltaLong extends Delta { @Override public boolean equals(Object obj) { if (obj instanceof DeltaLong) { DeltaLong dl = (DeltaLong) obj; if (delta != dl.delta) { return false; } return base == null ? dl.base == null : base.equals(dl.base); } return false; } DeltaLong(Long base, long delta); @Deprecated  DeltaLong(long base, long delta); }
DeltaLong extends Delta { @Override public boolean equals(Object obj) { if (obj instanceof DeltaLong) { DeltaLong dl = (DeltaLong) obj; if (delta != dl.delta) { return false; } return base == null ? dl.base == null : base.equals(dl.base); } return false; } DeltaLong(Long base, long delta); @Deprecated  DeltaLong(long base, long delta); static DeltaLong valueOf(Number base, long delta); @Deprecated static DeltaLong deltaOrLong(Number base, long delta); @Override Delta add(Delta other); @Override Number add(Number other); @Override Long getBase(); long getDelta(); @Override Long getDeltaValue(); @Override Long getFullValue(); @Override long longValue(); @Override int intValue(); @Override float floatValue(); @Override double doubleValue(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
DeltaLong extends Delta { @Override public boolean equals(Object obj) { if (obj instanceof DeltaLong) { DeltaLong dl = (DeltaLong) obj; if (delta != dl.delta) { return false; } return base == null ? dl.base == null : base.equals(dl.base); } return false; } DeltaLong(Long base, long delta); @Deprecated  DeltaLong(long base, long delta); static DeltaLong valueOf(Number base, long delta); @Deprecated static DeltaLong deltaOrLong(Number base, long delta); @Override Delta add(Delta other); @Override Number add(Number other); @Override Long getBase(); long getDelta(); @Override Long getDeltaValue(); @Override Long getFullValue(); @Override long longValue(); @Override int intValue(); @Override float floatValue(); @Override double doubleValue(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }