Java Double Number Create toDouble(Object value)

Here you can find the source of toDouble(Object value)

Description

to Double

License

Apache License

Declaration

public static Double toDouble(Object value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /** EMPTY [String] */
    public static final String EMPTY = "";

    public static Double toDouble(Object value) {

        try {/*  w w w  . j a va 2s  .  c  o  m*/
            if (value == null || EMPTY.equals(value)) {
                return null;
            }
            return Double.valueOf(value.toString());
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }

    }
}

Related

  1. toDouble(Object val)
  2. toDouble(Object val)
  3. toDouble(Object val)
  4. toDouble(Object value)
  5. toDouble(Object value)
  6. toDouble(Object value)
  7. toDouble(Object value)
  8. toDouble(Object value, double nullValue)
  9. toDouble(Object x)