Replace List.get(int), add(int, Object), and remove(int) with SequencedCollection *First and *Last methods

MSAL

Replace list.get(0) with list.getFirst(), list.get(list.size() - 1) with list.getLast(), and similar for add(int, E) and remove(int).

org.openrewrite.java.migrate.util.ListFirstAndLast
mod run . --recipe=org.openrewrite.java.migrate.util.ListFirstAndLast

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.