Java Number Convert to NumberToReal(Object n)

Here you can find the source of NumberToReal(Object n)

Description

converts a instance to a Double.

License

Open Source License

Parameter

Parameter Description
n VDM value.

Return

Double value.

Declaration

public static Double NumberToReal(Object n) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**// w w  w.  ja v a2s  .c o  m
     * converts a instance to a Double.
     *
     * @param n VDM value.
     * @return Double value.
     */
    public static Double NumberToReal(Object n) {
        if (n == null)
            return null;

        return new Double(((Number) n).doubleValue());
    }
}

Related

  1. numberToJson(Number number)
  2. numberToMinterm(int num, int length, int index, boolean[] output)
  3. numberToOrdinal(int i)
  4. numberToPaddedHexString(int number, int size)
  5. numberToPrimitiveLong(Object o)