public static @NonNull long[] appendLong(@Nullable long[] cur, long val) {
    return appendLong(cur, val, false);
  }
Adds value to given array if not already present, providing set-like behavior.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java