Java List to Array asArray(List values)

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

Description

as Array

License

Open Source License

Declaration

private static double[] asArray(List<Double> values) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Caleydo - Visualization for Molecular Biology - http://caleydo.org
 * Copyright (c) The Caleydo Team. All rights reserved.
 * Licensed under the new BSD license, available at http://caleydo.org/license
 *******************************************************************************/

import java.util.List;

public class Main {
    private static double[] asArray(List<Double> values) {
        double[] array = new double[values.size()];
        for (int i = 0; i < values.size(); i++) {
            array[i] = values.get(i);//from   w w w  .  ja v  a  2 s .  c  om
        }
        return array;
    }
}

Related

  1. asArray(Collection list)
  2. asArray(List indices)
  3. asArray(List list)
  4. asArray(List list)
  5. asArrayList(E first, E... other)