List of utility methods to do Double Number Create
Double | toDouble(Object val) to Double if (val == null) return null; if (val instanceof Number) return Double.valueOf(((Number) val).doubleValue()); return Double.valueOf(val.toString()); |
Double | toDouble(Object val) to Double if (val == null) { return 0D; try { return Double.valueOf(trim(val.toString())); } catch (Exception e) { return 0D; |
double | toDouble(Object val) to Double if (val instanceof Number) return ((Number) val).doubleValue(); if (val == null) return +0.0; if (val instanceof String) { try { return Double.parseDouble((String) val); } catch (NumberFormatException e) { ... |
Double | toDouble(Object value) to Double if (value == null) { return new Double(0); } else { return new Double(value.toString()); |
double | toDouble(Object value) to Double if (value instanceof Number) return ((Number) value).doubleValue(); else if (value == null) return 0; else return Double.parseDouble(value.toString()); |
Double | toDouble(Object value) to Double try { if (value == null || EMPTY.equals(value)) { return null; return Double.valueOf(value.toString()); } catch (Exception e) { e.printStackTrace(); return null; ... |
Double | toDouble(Object value) Convert an Object to a Double. if (value == null) return null; if (value instanceof Double) return (Double) value; if (value instanceof String) { if ("".equals((String) value)) return null; return new Double((String) value); ... |
Double | toDouble(Object value) to Double return toDouble(value, null);
|
double | toDouble(Object value, double nullValue) to Double if (value == null) return nullValue; if (value instanceof Number) return ((Number) value).doubleValue(); else return Double.parseDouble(value.toString()); |
Double | toDouble(Object x) to Double if (x instanceof Number) { return ((Number) x).doubleValue(); return Double.valueOf(x.toString()); |