• Those interfaces gives read-only APIs, but their instances can be modified
• e.g. In Kotlin/JVM, the instances are actually Java collections in java.util
• They can be casted into mutable collections
• Further reading: The Mystery of Mutable Kotlin Collections - ProAndroidDev
Two families of collections + collection builder:
| Interface | Base Interface(s) |
|---|---|
| ImmutableCollection | Collection |
| ImmutableList | ImmutableCollection, List |
| ImmutableSet | ImmutableCollection, Set |
| ImmutableMap | Map |
| Interface | Base Interface(s) |
|---|---|
| PersistentCollection | ImmutableCollection |
| PersistentList | PersistentCollection, ImmutableList |
| PersistentSet | PersistentCollection, ImmutableSet |
| PersistentMap | ImmutableMap |
| Interface | Base Interface(s) |
|---|---|
| PersistentCollection.Builder | MutableCollection |
| PersistentList.Builder | PersistentCollection.Builder, MutableList |
| PersistentSet.Builder | PersistentCollection.Builder, MutableSet |
| PersistentMap.Builder | MutableMap |