class Weights {

    public static double[] buildWeights(List<Number> weightList) {
        double[] weights = new double[weightList.size()];
        int i = 0;
        for (Number value : weightList) {
            weights[i++] = value.doubleValue();
        }
        return weights;
    }

}