/** * @see javax.jcr.Value#getDouble() */ public double getDouble() throws RepositoryException { return qvalue.getDouble(); }
/** * @see javax.jcr.Value#getDouble() */ public double getDouble() throws RepositoryException { return qvalue.getDouble(); }
/** * {@inheritDoc} */ public double getDouble() throws RepositoryException { setValueConsumed(); return qvalue.getDouble(); }
Double score = 0.0; if (v != null) { score = v.getDouble();
Double score = 0.0; if (v != null) { score = v.getDouble();
static String getJsonString(QValue value) throws RepositoryException { String str; switch (value.getType()) { case PropertyType.STRING: str = JsonUtil.getJsonString(value.getString()); break; case PropertyType.BOOLEAN: case PropertyType.LONG: str = value.getString(); break; case PropertyType.DOUBLE: double d = value.getDouble(); if (Double.isNaN(d) || Double.isInfinite(d)) { // JSON cannot specifically handle this property type... str = null; } else { str = value.getString(); if (str.indexOf('.') == -1) { str += ".0"; } } break; default: // JSON cannot specifically handle this property type... str = null; } return str; }
static String getJsonString(QValue value) throws RepositoryException { String str; switch (value.getType()) { case PropertyType.STRING: str = JsonUtil.getJsonString(value.getString()); break; case PropertyType.BOOLEAN: case PropertyType.LONG: str = value.getString(); break; case PropertyType.DOUBLE: double d = value.getDouble(); if (Double.isNaN(d) || Double.isInfinite(d)) { // JSON cannot specifically handle this property type... str = null; } else { str = value.getString(); if (str.indexOf('.') == -1) { str += ".0"; } } break; default: // JSON cannot specifically handle this property type... str = null; } return str; }
public void testGetDoubleOnBooleanValue() throws RepositoryException { try { QValue v = factory.create(true); v.getDouble(); fail("'true' cannot be converted to a valid double value."); } catch (ValueFormatException e) { // ok } }
public void testGetDoubleOnBooleanValue() throws RepositoryException { try { QValue v = factory.create(true); v.getDouble(); fail("'true' cannot be converted to a valid double value."); } catch (ValueFormatException e) { // ok } }
return new InternalValue(value.getCalendar()); case PropertyType.DOUBLE: return new InternalValue(value.getDouble()); case PropertyType.DECIMAL: return new InternalValue(value.getDecimal());
return new InternalValue(value.getCalendar()); case PropertyType.DOUBLE: return new InternalValue(value.getDouble()); case PropertyType.DECIMAL: return new InternalValue(value.getDecimal());
break; case PropertyType.DOUBLE: jcrValue = factory.createValue(qualifiedValue.getDouble()); break; case PropertyType.LONG:
break; case PropertyType.DOUBLE: jcrValue = factory.createValue(value.getDouble()); break; case PropertyType.LONG:
break; case PropertyType.DOUBLE: jcrValue = factory.createValue(value.getDouble()); break; case PropertyType.LONG: