@Test(groups = "fast") public void testConvertToDoubleOk() throws Exception { final long value1 = 1341345143; final DataItem item1 = new StringDataItem(String.valueOf(value1)); Assert.assertEquals(item1.getDouble(), (double) value1); final double value2 = 1341345143.13242142; final DataItem item2 = new StringDataItem(String.valueOf(value2)); Assert.assertEquals(item2.getDouble(), value2); }
@Override public Double getDouble() { if (value.isEmpty()) { return (double) 0; } return Double.valueOf(value); }
StringDataItem implements DataItem { @Override public Double getDouble() { if (value.isEmpty()) { return (double) 0; } return Double.valueOf(value); } }
StringDataItem implements DataItem { @Override public Double getDouble() { if (value.isEmpty()) { return (double) 0; } return Double.valueOf(value); } StringDataItem();  StringDataItem(final String value); }
StringDataItem implements DataItem { @Override public Double getDouble() { if (value.isEmpty()) { return (double) 0; } return Double.valueOf(value); } StringDataItem();  StringDataItem(final String value); @Override Boolean getBoolean(); @Override Byte getByte(); @Override Integer getInteger(); @Override Short getShort(); @Override Long getLong(); @Override String getString(); @Override Double getDouble(); @Override Comparable getComparable(); @Override int compareTo(final Object o); @Override int hashCode(); @Override boolean equals(final Object o); @Override void write(final DataOutput out); @Override void readFields(final DataInput in); @Override String toString(); @Override byte getThriftType(); }
StringDataItem implements DataItem { @Override public Double getDouble() { if (value.isEmpty()) { return (double) 0; } return Double.valueOf(value); } StringDataItem();  StringDataItem(final String value); @Override Boolean getBoolean(); @Override Byte getByte(); @Override Integer getInteger(); @Override Short getShort(); @Override Long getLong(); @Override String getString(); @Override Double getDouble(); @Override Comparable getComparable(); @Override int compareTo(final Object o); @Override int hashCode(); @Override boolean equals(final Object o); @Override void write(final DataOutput out); @Override void readFields(final DataInput in); @Override String toString(); @Override byte getThriftType();  }