Java Double Number Create toDouble(Number value)

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

Description

Turns a Number object into a double primitive.

License

LGPL

Parameter

Parameter Description
value number object

Return

primitive value

Declaration

public static double toDouble(Number value) 

Method Source Code

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

public class Main {
    /**//www  . java  2  s . c o  m
     * Turns a Number object into a double primitive.
     * If the supplied value is null, Double.NaN is returned.
     *
     * @param  value  number object
     * @return   primitive value
     */
    public static double toDouble(Number value) {
        return value == null ? Double.NaN : value.doubleValue();
    }
}

Related

  1. toDouble(int[] rgb)
  2. toDouble(int[][] arr)
  3. toDouble(Number n)
  4. toDouble(Number number)
  5. toDouble(Number value)
  6. toDouble(Object _inStrObj)
  7. toDouble(Object _value, double _default)
  8. toDouble(Object argSource)
  9. toDouble(Object literal)