【クラス図】kotlin.collections パッケージのトップレベルインターフェイス

Kotlin 標準ライブラリーに含まれる `kotlin.collections` パッケージに存在するトップレベルのインターフェイスのクラス図。

ミュータブルなものはステレオタイプ《mutable》とした。

### Iterator 系

![image.png](https://qiita-image-store.s3.amazonaws.com/0/61280/3f9ca8ca-fe99-cb9b-6629-f8d7ac545a39.png)

### Iterable, Collection 系

![image.png](https://qiita-image-store.s3.amazonaws.com/0/61280/ff85be66-c5f5-81fa-d057-611054a21874.png)

### Map 系

![image.png](https://qiita-image-store.s3.amazonaws.com/0/61280/a5f9a393-d4ca-6c2b-725c-04e56d85bab2.png)

### その他

![image.png](https://qiita-image-store.s3.amazonaws.com/0/61280/3de0fe2d-8827-cfc5-3432-4970dbbdf9bc.png)

### PlantUML

<details><summary>PlantUML</summary>
```uml
@startuml
'
ListIterator -up-|> Iterator
MutableIterator -left-|> Iterator
MutableListIterator -left-|> ListIterator
MutableListIterator -up-|> MutableIterator
'
Collection -up-|> Iterable
List -up-|> Collection
Set -up-|> Collection
MutableIterable -left-|> Iterable
MutableCollection -left-|> Collection
MutableCollection -up-|> MutableIterable
MutableList -left-|> List
MutableList -up-|> MutableCollection
MutableSet -left-|> Set
MutableSet -up-|> MutableCollection
'
MutableMap -left-|> Map
'
interface Iterator<T> {
  hasNext(): Boolean
  next(): T
}
interface ListIterator<T> {
  hasPrevious(): Boolean
  nextIndex(): Int
  previous(): T
  previousIndex(): Int
}
interface MutableIterator<T> <<mutable>> {
  remove()
}
interface MutableListIterator<T> <<mutable>> {
  add(element: T)
  set(element: T)
}
'
interface Iterable<T> {
  iterator(): Iterator<T>
}
interface Collection<E> {
  val size: Int
  contains(element: E): Boolean
  containsAll(elements: Collection<E>): Boolean
  isEmpty(): Boolean
}
interface List<E> {
  get(index: Int): E
  indexOf(element: E): Int
  lastIndexOf(element: E): Int
  listIterator(): ListIterator<E>
  listIterator(index: Int): ListIterator<E>
  subList(fromIndex: Int, toIndex: Int): List<E>
}
interface Set<E> {
}
interface MutableIterable<T> <<mutable>> {
  iterator(): MutableIterator<T>
}
interface MutableCollection<E> <<mutable>> {
  add(element: E): Boolean
  addAll(elements: Collection<E>): Boolean
  clear()
  remove(element: E): Boolean
  removeAll(elements: Collection<E>): Boolean
  retainAll(elements: Collection<E>): Boolean
}
interface MutableList<E> <<mutable>> {
  add(index: Int, element: E)
  addAll(index: Int, elements: Collection<E>): Boolean
  listIterator(): MutableListIterator<E>
  listIterator(index: Int): MutableListIterator<E>
  removeAt(index: Int): E
  set(index: Int, element: E): E
  subList(fromIndex: Int, toIndex: Int): MutableList<E>
}
interface MutableSet<E> <<mutable>> {
}
'
interface Map<K, V> {
  val entries: Set<Entry<K, V>>
  val keys: Set<K>
  val size: Int
  val values: Collection<V>
  containsKey(key: K): Boolean
  containsValue(value: V): Boolean
  get(key: K): V?
  getOrDefault(key: K, defaultValue: V): V
  isEmpty(): Boolean
}
interface MutableMap<K, V> <<mutable>> {
  val entries: MutableSet<MutableEntry<K, V>>
  val keys: MutableSet<K>
  val values: MutableCollection<V>
  clear()
  put(key: K, value: V): V?
  putAll(from: Map<out K, V>)
  remove(key: K): V?
  remove(key: K, value: V): Boolean
}
'
interface RandomAccess {
}
interface Grouping {
  keyOf(element: T): K
  sourceIterator(): Iterator<T>
}
'
skinparam class {
  BackgroundColor<<mutable>> Wheat
}
@enduml
```
</details>