Java List to Primitive Array toPrimitiveDouble(List values)

Here you can find the source of toPrimitiveDouble(List values)

Description

to Primitive Double

License

Open Source License

Declaration

public static double[] toPrimitiveDouble(List<Double> values) 

Method Source Code

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

import java.util.Iterator;
import java.util.List;

public class Main {
    public static double[] toPrimitiveDouble(List<Double> values) {
        double[] result = new double[values.size()];
        Iterator<Double> iterator = values.iterator();

        for (int i = 0; i < result.length; i++) {
            result[i] = iterator.next().doubleValue();
        }/*from w w  w .j a v  a2  s.c o m*/

        return result;
    }
}

Related

  1. toPrimitiveArray(List array)
  2. toPrimitiveArray(List input)
  3. toPrimitiveArray(List list)
  4. toPrimitiveArray(List target_)
  5. toPrimitivebyList(List list)
  6. toPrimitiveIntArray(List temp)
  7. toPrimitiveIntArray(List values)
  8. toPrimitiveIntegerArray(List listOfInt)
  9. toPrimitiveLongArray(List items)