code: @InterfaceAudience.Public
      public static double totalValues(List<Object> values) {
          double total = 0;
          for (Object object : values) {
              if (object instanceof Number) {
                  Number number = (Number) object;
                  total += number.doubleValue();
              } else {
                  Log.w(Log.TAG_VIEW, "Warning non-numeric value found in totalValues: %s", object);
              }
          }
          return total;
      }
docs: Utility function to use in reduce blocks. Totals an array of Numbers.