static int lastIndexOfImpl(List<?> list, @NullableDecl Object element) {
    if (list instanceof RandomAccess) {
      return lastIndexOfRandomAccess(list, element);
    } else {
      ListIterator<?> listIterator = list.listIterator(list.size());
      while (listIterator.hasPrevious()) {
        if (Objects.equal(element, listIterator.previous())) {
          return listIterator.nextIndex();
        }
      }
      return -1;
    }
  }
static int lastIndexOfImpl(List<?> list, @NullableDecl Object element) {
    if (list instanceof RandomAccess) {
      return lastIndexOfRandomAccess(list, element);
    } else {
      ListIterator<?> listIterator = list.listIterator(list.size());
      while (listIterator.hasPrevious()) {
        if (Objects.equal(element, listIterator.previous())) {
          return listIterator.nextIndex();
        }
      }
      return -1;
    }
  }
static int lastIndexOfImpl ( List < ? > list , @ NullableDecl Object element ) { if ( list instanceof RandomAccess ) { return lastIndexOfRandomAccess ( list , element ) ; } else { ListIterator < ? > listIterator = list . listIterator ( list . size ( ) ) ; while ( listIterator . hasPrevious ( ) ) { if ( Objects . equal ( element , listIterator . previous ( ) ) ) { return listIterator . nextIndex ( ) ; } } return - 1 ; } }
An implementation of {@link List#lastIndexOf(Object)}.
An implementation of {