Here you can find the source of toDoubleArray(final Collection
Parameter | Description |
---|---|
doubleColl | The collection to convert. |
public static Double[] toDoubleArray(final Collection<Double> doubleColl)
//package com.java2s; //License from project: BSD License import java.util.Collection; public class Main { /**//from ww w.j a v a 2s . co m * Converts the given collection of Doubles to an array of Doubles. Returns * an empty array for null collections. * * @param doubleColl * The collection to convert. * @return An array filled with the data in the given collection. */ public static Double[] toDoubleArray(final Collection<Double> doubleColl) { if (doubleColl == null) { return new Double[0]; } return doubleColl.toArray(new Double[doubleColl.size()]); } }