Java List to Double Array toDoubleArray(List list)

Here you can find the source of toDoubleArray(List list)

Description

to Double Array

License

Open Source License

Declaration

public final static double[] toDoubleArray(List<Double> list) 

Method Source Code

//package com.java2s;

import java.util.List;

public class Main {
    public final static double[] toDoubleArray(List<Double> list) {
        double[] res = new double[list.size()];
        int index = 0;
        for (double d : list) {
            res[index++] = d;/*from  w  w  w  . j a va 2 s .  co  m*/
        }
        return res;
    }

    public final static double[] toDoubleArray(int[] a) {
        double[] res = new double[a.length];
        for (int i = 0; i < a.length; i++) {
            res[i] = a[i];
        }
        return res;
    }
}

Related

  1. toDoubleArray(final List numbers)
  2. toDoubleArray(final List list)
  3. toDoubleArray(List a)
  4. toDoubleArray(List list)
  5. toDoubleArray(List list)
  6. toDoubleArray(List list)
  7. toDoubleArray(List list)
  8. toDoubleArray(List list)