@Test public void testNumericValue() { Date timestamp = decoder.decodeValue(TEST_VALUE); assertEquals(timestamp.getClass(), Date.class); assertEquals(timestamp, new Date(Long.parseLong(TEST_VALUE) * 1000L)); }
@Override public Date decodeValue(String value) { try { return new Date(Long.parseLong(value) * 1000L); } catch (NumberFormatException e) { throw new IllegalArgumentException("Date property value must be numeric."); } }
DatePropertyValueDecoder implements IPropertyValueDecoder<Date> { @Override public Date decodeValue(String value) { try { return new Date(Long.parseLong(value) * 1000L); } catch (NumberFormatException e) { throw new IllegalArgumentException("Date property value must be numeric."); } } }
DatePropertyValueDecoder implements IPropertyValueDecoder<Date> { @Override public Date decodeValue(String value) { try { return new Date(Long.parseLong(value) * 1000L); } catch (NumberFormatException e) { throw new IllegalArgumentException("Date property value must be numeric."); } } DatePropertyValueDecoder(); }
DatePropertyValueDecoder implements IPropertyValueDecoder<Date> { @Override public Date decodeValue(String value) { try { return new Date(Long.parseLong(value) * 1000L); } catch (NumberFormatException e) { throw new IllegalArgumentException("Date property value must be numeric."); } } DatePropertyValueDecoder(); @Override Date decodeValue(String value); @Override List<Class<Date>> getSupportedTypes(); }
DatePropertyValueDecoder implements IPropertyValueDecoder<Date> { @Override public Date decodeValue(String value) { try { return new Date(Long.parseLong(value) * 1000L); } catch (NumberFormatException e) { throw new IllegalArgumentException("Date property value must be numeric."); } } DatePropertyValueDecoder(); @Override Date decodeValue(String value); @Override List<Class<Date>> getSupportedTypes();  }