As per your question,
List<Double> frameList = new ArrayList<Double>();
First you have to convert List<Double>
to Double[]
by using
Double[] array = frameList.toArray(new Double[frameList.size()]);
Next you can convert Double[]
to double[]
using
double[] doubleArray = ArrayUtils.toPrimitive(array);
You can directly use it in one line:
double[] array = ArrayUtils.toPrimitive(frameList.toArray(new Double[frameList.size()]));