DateValue implements CellValue { public static DateValue from(final Object o) throws FastOdsException { if (o instanceof Date) { return new DateValue((Date) o); } else if (o instanceof Calendar) { return new DateValue(((Calendar) o).getTime()); } else if (o instanceof Number) { return new DateValue(new Date(((Number) o).longValue())); } else if (o instanceof DateValue) { return (DateValue) o; } else { throw new FastOdsException("Can't cast " + o + " to Date"); } } DateValue(final Date value); static DateValue from(final Object o); @Override void setToCell(final TableCell cell); @Override boolean equals(final Object o); @Override final int hashCode(); @Override String toString();  }
@Test(expected = FastOdsException.class) public final void testFromString() throws FastOdsException { DateValue.from("10"); }