TreeMap
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.
The keys and entries use a specialized implementation which shares the tree used by the map. This allows operations on the returned sets to be reflected on the map without any additional performance costs. Note that neither keys nor entries support adding new values, following the convention set by key sets in JVM maps.
Removing map entries while iterating is not allowed, and using MutableIterator.remove will throw an exception.