Here you can find the source of asArray(List
private static double[] asArray(List<Double> values)
//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; } }