code: public static double[] toDoubles(List<Double> objects)
  	{
  		if (objects == null || objects.isEmpty())
  			return null;
  
  		double[] rets = new double[objects.size()];
  
  		for (int i = 0; i < rets.length; i++)
  		{
  			rets[i] = objects.get(i);
  		}
  		return rets;
  
  	}
docs: --------------------------------------------