public static double [ ] asDoubleArray ( Collection collection ) { double [ ] result = new double [ collection . size ( ) ] ; int i = 0 ; for ( Object c : collection ) { result [ i ++ ] = asDouble ( c ) ; } return result ; }
Make collection into a double array .