/*******************************************************************************
 * Copyright (C) 2013  Stefan Schroeder
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either 
 * version 3.0 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public 
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
package jsprit.core.util;

import java.util.List;

public class ArrayUtils {

	public static double[] toPrimitiveArray(List<Double> list){
		double[] arr = new double[list.size()];
		for(int i=0;i<list.size();i++) arr[i]=list.get(i);
		return arr;
	}
	
}

@@ -899,16 +899,45 @@
 .util;%0A%0A
+import java.util.Collection;%0A
 import j
@@ -1151,13 +1151,218 @@
  arr;%0A%09%7D
+%0A%0A%09public static double%5B%5D toPrimitiveArray(Collection%3CDouble%3E collection)%7B%0A%09%09double%5B%5D arr = new double%5Bcollection.size()%5D;%0A%09%09int i=0;%0A%09%09for(Double d : collection)%7B%0A%09%09%09arr%5Bi%5D=d;%0A%09%09%09i++;%0A%09%09%7D%0A%09%09return arr;%0A%09%7D
 %0A%09%0A%7D%0A

add toPrimitiveArray(Collection)