Java, Java8, Java21, Java17, Migration.
there are also SequencedMap and SequencedSet interfaces. interface SequencedCollection<E> extends Collection<E> { // new method SequencedCollection<E> reversed(); // methods promoted from Deque void addFirst(E); void addLast(E); E getFirst(); E getLast(); E removeFirst(); E removeLast(); } The