Here you can find the source of toDoubleArray(List
Parameter | Description |
---|---|
values | the list of instances of class Double |
public static double[] toDoubleArray(List<Double> values)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { /**//w w w . j a va2 s. co m * Creates an array of type double[] from a list of instances of class Double. * @param values the list of instances of class Double * @return the array of type double[] containing the values from the given list */ public static double[] toDoubleArray(List<Double> values) { double ret[] = new double[values.size()]; for (int i = 0; i < ret.length; i++) ret[i] = values.get(i); return ret; } }