~/talk

Collections Refueled

Talkat Oracle Code One 2018 · 2018-10-22..10-25· [java]
slides:none on file

Java 9 adds library-only convenience factory methods like List.of/Set.of/Map.of and Map.ofEntries/Map.entry that produce new, unmodifiable collection implementations which disallow nulls and (for sets/maps) duplicate keys, randomize iteration order per JVM start, and prioritize space efficiency over raw HashMap speed — e.g., storing two elements drops overhead from roughly 152 bytes to 20 bytes. Java 10 adds copyOf and unmodifiable collectors to snapshot mutable data into these compact, serializable, unmodifiable structures.

AI-written summary · about

  1. 0:00Introduction
  2. 0:35History
  3. 2:00Collections Convenience Factory
  4. 2:38Background
  5. 3:46New API
  6. 4:51Math API
  7. 5:58Examples
  8. 7:17Map
  9. 8:05Map Entries
  10. 8:47Unmodifiable
  11. 14:30Unmodifiable Use Cases
  12. 16:26Unmodifiable Collections
  13. 17:45Nulls disallowed
  14. 19:02Randomized iteration order
  15. 22:23Other programming systems
  16. 25:00Duplicates
  17. 25:50Duplicates Example
  18. 26:56Compact
  19. 29:37Overhead
  20. 31:17Small Collections
  21. 32:23SetCopyOf
  22. 37:02Summary
~/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.