Kotlin 標準ライブラリーに含まれる kotlin.collections
パッケージに存在するトップレベルのインターフェイスのクラス図。
ミュータブルなものはステレオタイプ《mutable》とした。
Iterator 系

Iterable, Collection 系

Map 系

その他

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