TimeValue implements CellValue { @Override public boolean equals(final Object o) { if (o == this) { return true; } if (!(o instanceof TimeValue)) { return false; } final TimeValue other = (TimeValue) o; return this.neg == other.neg && this.totalMonths() == other.totalMonths() && Math.abs(this.totalSeconds() - other.totalSeconds()) < FloatValue.FLOAT_DELTA; } TimeValue(final boolean neg, final long years, final long months, final long days,
                     final long hours, final long minutes, final double seconds); static TimeValue from(final Object o); @Override boolean equals(final Object o); @Override final int hashCode(); @Override void setToCell(final TableCell tableCell); @Override String toString();  }
@Test public void testEquals() throws FastOdsException { final TimeValue tv1 = new TimeValue(false, 0, 0, 1, 2, 3, 4); final long l = ((((1 * 24 + 2) * 60) + 3) * 60 + 4) * 1000; Assert.assertEquals(tv1, TimeValue.from(l)); Assert.assertNotEquals(tv1, TimeValue.from(-l)); }