Java Primitive Type Create toPrimitive(Double[] array)

Here you can find the source of toPrimitive(Double[] array)

Description

to Primitive

License

GNU General Public License

Declaration

public static double[] toPrimitive(Double[] array) 

Method Source Code

//package com.java2s;
/*//  w w w  . java 2  s. c  o  m
 * Part of Fresco software under GPL licence
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */

public class Main {
    public static double[] toPrimitive(Double[] array) {
        if (array == null) {
            return null;
        } else if (array.length == 0) {
            return new double[0];
        }
        final double[] result = new double[array.length];
        for (int i = 0; i < array.length; i++) {
            result[i] = array[i].doubleValue();
        }
        return result;
    }
}

Related

  1. toPrimitive(Byte[] objectArray)
  2. toPrimitive(Character value)
  3. toPrimitive(Character[] in)
  4. toPrimitive(Class aClass)
  5. toPrimitive(Class clazz)
  6. toPrimitive(Double[] array)
  7. toPrimitive(Double[] doubles)
  8. toPrimitive(Double[] vals)
  9. toPrimitive(final Boolean b)