public static <T> boolean contains(@Nullable Collection<T> cur, T val) {
    return (cur != null) ? cur.contains(val) : false;
  }
Removes value from given array if present, providing set-like behavior.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java