FloatValue implements CellValue { @Override public boolean equals(final Object o) { if (o == this) { return true; } if (!(o instanceof FloatValue)) { return false; } final FloatValue other = (FloatValue) o; return this.value.equals(other.value); } FloatValue(final Number value); static FloatValue 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() { final CellValue fv1 = new FloatValue(10.0); final CellValue fv2 = new FloatValue(10.0); final CellValue fv3 = new FloatValue(11.0); final CellValue bv1 = new BooleanValue(true); Assert.assertEquals(fv1, fv1); Assert.assertEquals(fv1, fv2); Assert.assertEquals(fv1.hashCode(), fv2.hashCode()); Assert.assertNotEquals(fv1, fv3); Assert.assertNotEquals(fv1.hashCode(), fv3.hashCode()); Assert.assertNotEquals(fv1, bv1); Assert.assertNotEquals(fv1.hashCode(), bv1.hashCode()); Assert.assertNotEquals(fv1, "fv1"); Assert.assertNotEquals(fv1.hashCode(), "fv1".hashCode()); }