Sequenced Collections - Deep Dive with the Expert
Stuart Marks on April 12, 2025The Java Collections Framework has historically lacked a collection type that represents a sequence of elements with a defined encounter order, along with a uniform set of operations that applies across such collections. These gaps have been resolved with the introduction of Sequenced Collections in JDK 21. The addition of new sequenced types provides places for common order-relevant operations. These new operations include addition, retrieval, and removal of elements at either end of the collection, and the ability to view, iterate, and stream elements in reverse order. Various deficiencies in LinkedHashMap have also been remedied. Attendees will learn about how they can improve their code using the new Sequenced Collections APIs.
Make sure to check the JavaOne 2025 playlist.