Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
abstract class RedBlackTree<K : Comparable<K>, V>

Implementation of a Red/Black Tree data structure, serving as a base for specialized data structures such as maps and sets.

Link copied to clipboard

A MutableSortedMap implementation backed by a Red/Black Tree, with each map entry being represented as a node. Search, insertion, and removal all run in O(log n) time thanks to the properties of the tree.

Link copied to clipboard

A MutableSortedSet implementation backed by a Red/Black Tree, with each map entry being represented as a node. Search, insertion, and removal all run in O(log n) time thanks to the properties of the tree.

Functions

Link copied to clipboard

Returns an empty, read-only sorted map.

Link copied to clipboard

Returns an empty, read-only sorted map.

Link copied to clipboard
fun <K : Comparable<K>, V> mutableSortedMapOf(vararg pairs: <Error class: unknown class><K, V>): MutableSortedMap<K, V>

Returns a new mutable sorted map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.

Link copied to clipboard
fun <V : Comparable<V>> mutableSortedSetOf(vararg values: V): MutableSortedSet<V>

Returns a new mutable sorted set with the given elements. Elements of the set are iterated in according to their natural order.

Link copied to clipboard
fun <K : Comparable<K>, V> sortedMapOf(vararg pairs: <Error class: unknown class><K, V>): SortedMap<K, V>
fun <K : Comparable<K>, V> sortedMapOf(pairs: Collection<<Error class: unknown class><K, V>>): SortedMap<K, V>

Returns a new read-only sorted map with the specified contents, given as a list of pairs where the first value is the key and the second is the value.

Link copied to clipboard
fun <V : Comparable<V>> sortedSetOf(vararg values: V): SortedSet<V>

Returns a new read-only sorted set with the given elements. Elements of the set are iterated in according to their natural order.