public static <T> int indexOf(@Nullable T[] array, T value) {
    if (array == null) return -1;
    for (int i = 0; i < array.length; i++) {
      if (Objects.equals(array[i], value)) return i;
    }
    return -1;
  }
Return first index of {@code value} in {@code array}, or {@code -1} if not found.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java