docs: 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;
      }