Java Double Number Create toDouble(Object object)

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

Description

to Double

License

Apache License

Declaration

public static Double toDouble(Object object) 

Method Source Code

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

public class Main {
    public static Double toDouble(Object object) {
        return object instanceof Number ? ((Number) object).doubleValue() : Double.parseDouble(object.toString());
    }//from   w ww.  j  ava  2 s  .c o m

    public static String toString(Object object) {
        return object == null ? null : object.toString();
    }
}

Related

  1. toDouble(Object obj)
  2. toDouble(Object obj)
  3. toDouble(Object obj)
  4. toDouble(Object obj)
  5. toDouble(Object obj)
  6. toDouble(Object object, double defaultValue)
  7. toDouble(Object object, Double defaultValue)
  8. toDouble(Object objValue)
  9. toDouble(Object prmIntObject)