What is wrong in the loop?
double[] parsed = new double[values.length]; for (int i = 0; i<values.length; i++) parsed[i] = Double.valueOf(values[i]);
not particularly awkward. In addition, you can easily add the correct error handling.
Of course, you can easily wrap this as you like.
OpenJDK8 is likely to bring lambda expressions, and using Double.valueOf as the "map" function will be a prime example for this.
source share