~/talk

Sequenced Collections - Deep Dive with the Expert

Talkat JavaOne 2025 · 2025-03-18..03-20· [java]
slides:none on file

JDK 21 (JEP 431) adds three interfaces—SequencedCollection, SequencedSet, SequencedMap—that guarantee encounter order and supply addFirst/addLast, getFirst/getLast, removeFirst/removeLast plus a reversed view and reversed.stream. Demos show reverse views are live (no copying), getLast replaces size-1 indexing, LinkedHashSet/LinkedHashMap now let existing entries move to front or back by addFirst/addLast, and reverse streaming replaces messy ListIterator-to-Spliterator hacks with a simple reversed.stream call.

AI-written summary · about

  1. 0:00Intro
  2. 0:21Collection Framework Overview
  3. 1:38Choosing the Right Collection
  4. 8:33JEP 431 - Sequenced Collections
  5. 10:10Collection Interface Hierarchy Evolution
  6. 11:45SequencedCollection Interface
  7. 13:48SequencedSet Interface
  8. 14:15SequencedMap Interface
  9. 15:57Removing First and Last Elements
  10. 18:26Iterating in Reverse
  11. 21:22Streaming in Reverse
  12. 22:45Using SequencedCollection in APIs
  13. 24:47Rehabilitation of LinkedHashSet & LinkedHashMap
  14. 26:36Demos
  15. 32:58Design Rationals
  16. 42:14Summary & Future Directions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.