Here you can find the source of toDoubleArray(List extends Number> a)
public static double[] toDoubleArray(List<? extends Number> a)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static double[] toDoubleArray(List<? extends Number> a) { double[] d = new double[a.size()]; for (int i = 0; i < d.length; ++i) { d[i] = a.get(i).doubleValue(); }/* w w w . ja v a 2 s . co m*/ return d; } public static <T extends Number, R> T get(Map<R, T> map, R key, T defaultValue) { T val = map.get(key); return val == null ? defaultValue : val; } }