code: public static double sum(Collection<? extends Number> values) {
          double sum = 0d;
          for (Number n : values)
              sum += n.doubleValue();
          return sum;
      }
docs: Returns the sum of the collection of numbers