code: static int indexOfImpl(List<?> list, @Nullable Object element) {
      ListIterator<?> listIterator = list.listIterator();
      while (listIterator.hasNext()) {
        if (Objects.equal(element, listIterator.next())) {
          return listIterator.previousIndex();
        }
      }
      return -1;
    }
docs: An implementation of {@link List#indexOf(Object)}.