public static long total(@Nullable long[] array) {
    long total = 0;
    if (array != null) {
      for (long value : array) {
        total += value;
      }
    }
    return total;
  }
Test if all {@code check} items are contained in {@code array}.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java