Java Object to Double asDouble(Object value)

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

Description

as Double

License

Apache License

Declaration

public static double asDouble(Object value) 

Method Source Code

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

public class Main {
    public static double asDouble(Object value) {
        if (value == null) {
            return -1;
        } else {//from ww  w  . ja  v a2  s  .c  o m
            return Double.parseDouble(value.toString());
        }
    }
}

Related

  1. asDouble(Object o)
  2. asDouble(Object obj)
  3. asDouble(Object val, Double def)
  4. asDouble(Object value)
  5. asDouble(Object value)
  6. castDouble(Object o)
  7. castDoubleToFloat(final double v)
  8. castShortToDouble(short[] x)
  9. castToDouble(Object object)