Here you can find the source of toPrimitive(Double[] vals)
public static double[] toPrimitive(Double[] vals)
//package com.java2s; //License from project: LGPL public class Main { public static double[] toPrimitive(Double[] vals) { double[] v = new double[vals.length]; for (int i = 0; i < v.length; i++) { v[i] = vals[i];/*w ww. j a v a 2 s .co m*/ } return v; } }