FloatValue implements CellValue { public static FloatValue from(final Object o) throws FastOdsException { if (o instanceof Number) { return new FloatValue((Number) o); } else if (o instanceof FloatValue) { return (FloatValue) o; } else { throw new FastOdsException("Can't cast " + o + " to Float"); } } 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 testFromFloatValue() throws FastOdsException { final CellValue fv1 = FloatValue.from(10.0); final CellValue fv2 = FloatValue.from(fv1); Assert.assertEquals(fv1, fv2); Assert.assertEquals(fv2, fv1); }
@Test(expected = FastOdsException.class) public void testFromObject() throws FastOdsException { FloatValue.from(new Object()); }
@Test public void testNumber() throws FastOdsException { Assert.assertEquals(FloatValue.from(13), new FloatValue(13)); }