Here you can find the source of toPrimitiveDouble(List
public static double[] toPrimitiveDouble(List<Double> values)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; public class Main { public static double[] toPrimitiveDouble(List<Double> values) { double[] result = new double[values.size()]; Iterator<Double> iterator = values.iterator(); for (int i = 0; i < result.length; i++) { result[i] = iterator.next().doubleValue(); }/*from w w w .j a v a2 s.c o m*/ return result; } }