Card 08/ 08

RecapDifficulty: Advanced1 min

Recap: The Collections Framework

Three promises, contains on a list and a set, declared types, Map's views and unmodifiable lists.

The Collections Framework comes down to the five ideas below, each listed with the card that covers it.

What the topic established, and which card it was on
The ideaWhere
List keeps order and duplicates, Set keeps each once, Queue decides what is nextCollection Interfaces: List, Set and Queue
contains walks a list and is one lookup on a hash setList vs Set vs Queue
Name the interface everywhere except after newDeclaring the Interface Type, Not the Class
Map holds pairs, sits outside Collection, and offers three viewsWhy Map Is Not a Collection
List.of is unmodifiable, and add throws rather than failing to compileUnmodifiable Lists: Why List.of(...) Refuses add()

Choose the interface from the promise you need, and the class afterwards.