Collections Refueled
summary
Covers concrete Java 8 and 9 changes: Java 8 adds lambda-capable default methods like forEach, removeIf optimized for ArrayList (reduces O(n^2) deletes to O(n)), replaceAll, List.sort with ArrayList override, Map.computeIfAbsent/computeIfPresent/forEach/replaceAll and Comparator combinators (comparing, thenComparing, nullsFirst) that simplify and safer comparator logic. Java 9 supplies static factories List.of / Set.of / Map.of (Map.ofEntries) that return compact, immutable collections, disallow nulls, throw on duplicate keys, use randomized iteration order for robustness, and significant space savings (example 152B → 20B).
AI-written summary · about
chapters (27)
- 0:00Introduction
- 0:17Presentation Overview
- 1:22Collections in Java
- 3:27Collections Enhancements
- 5:28Enhanced Forloop
- 6:42Iterable
- 7:41RemoveIf
- 10:19ReplaceAll
- 12:49Sort
- 14:46Map
- 16:59Multimap
- 18:06Multimap Code
- 18:56New Map Methods
- 21:38Comparators
- 28:06History
- 30:45Design Goals
- 33:04Overview
- 35:25MapEntry
- 36:42Implementation Issues
- 39:32Entry
- 39:59Immutability
- 42:54Randomized iteration order
- 46:59Nulls
- 48:45Duplicate Entries
- 49:57Existing Collections
- 50:35Design Rationale
- 50:50Summary








