code: public static Double toDouble(Object value) {
          if (value == null) {
              return null;
          } else if (value instanceof Double) {
              return (Double) value;
          } else if (value instanceof Number) {
              return ((Number) value).doubleValue();
          } else {
              try {
                  return Double.valueOf(value.toString().trim());
              } catch (NumberFormatException e) {
                  throw new ConversionException("failed to convert: '" + value + "' to Double", e);
              }
          }
      }
docs: Converts any value to <code>Double</code>.
  @param value value to convert.
  
  @return converted double.