Java Collection to Array toDoubleArray(Collection ds)

Here you can find the source of toDoubleArray(Collection ds)

Description

to Double Array

License

BSD License

Declaration

public static double[] toDoubleArray(Collection<Double> ds) 

Method Source Code


//package com.java2s;
//License from project: BSD License 

import java.util.*;

public class Main {
    public static double[] toDoubleArray(Collection<Double> ds) {
        double[] out = new double[ds.size()];
        int index = 0;
        for (Double d : ds)
            out[index++] = d;//  w w w.  ja va 2  s .c  om
        return out;
    }
}

Related

  1. toClassArray(Collection> collection)
  2. toClassArray(Collection> collection)
  3. toClassArray(final Collection collection)
  4. toDouble(final Collection numbers)
  5. toDoubleArray(Collection items)
  6. toDoubleArray(final Collection doubleColl)
  7. toFloatArray(Collection collection)
  8. toFloatArray(Collection c)
  9. toFloatArray(Collection array)