Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Hierarchy

Traversable
  └── Iterable
        ├── Seq
        │     ├── LinearSeq
        │     │     ├── List
        │     │     ├── LazyList
        │     │     ├── Queue
        │     │     └── Stack
        │     ├── IndexedSeq
        │     │     ├── Vector
        │     │     ├── Range
        │     │     ├── String (Implicit)
        │     │     └── Array (Implicit)
        │     ├── Mutable
        │     │     ├── ArrayBuffer
        │     │     ├── ArraySeq
        │     │     └── StringBuilder
        ├── Set
        │     ├── SortedSet
        │     │     └── TreeSet
        │     ├── HashSet
        │     ├── BitSet
        │     ├── Mutable
        │     │     ├── HashSet
        │     │     ├── LinkedHashSet
        │     │     └── TreeSet
        ├── Map
        │     ├── SortedMap
        │     │     └── TreeMap
        │     ├── HashMap
        │     ├── ListMap
        │     ├── Mutable
        │     │     ├── HashMap
        │     │     ├── LinkedHashMap
        │     │     ├── TreeMap
        │     │     └── WeakHashMap

Key Points

  1. Traversable is the root of the collection hierarchy.
  2. Iterable extends Traversable and adds the iterator method.
  3. Seq, Set, and Map are the main collection types, each with mutable and immutable versions.
  4. LinearSeq and IndexedSeq are subtypes of Seq for specific sequence implementations.
  5. SortedSet and SortedMap are specialized collections for sorted elements.