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 static double[] toDoubleArray(List<Double> list) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static double[] toDoubleArray(List<Double> list) {
        try {/*w  w  w . ja  v  a 2  s .  c  o m*/
            double[] ret = new double[list.size()];

            for (int i = 0; i < ret.length; i++) {
                ret[i] = list.get(i);
            }

            return ret;
        } catch (NullPointerException e) {
            return null;
        }
    }
}

Related

  1. toDoubleArray(List list)
  2. toDoubleArray(List list)
  3. toDoubleArray(List list)
  4. toDoubleArray(List list)
  5. toDoubleArray(List list)
  6. toDoubleArray(List values)
  7. toDoubleArray(List stringArray)
  8. toDoubleArray(List values)
  9. toDoubleList(double[] array)