Scoop API

scoop:scoop.std:0.1.0

TreeMap

class TreeMap

source · line 11
public
public class TreeMap<K, V> public constructor(
    /**
     * The comparator used for ordering and, for ordered maps/sets, equivalence.
     */
    public override val comparator: Comparator<K>
) : MutableSortedMap<K, V>

A mutable ordered map using the supplied comparator for both order and key equivalence. Iteration visits ascending keys; comparator-equivalent keys occupy one entry.

function put

source · line 78
public
public override fun put(key: K, value: V): V?
  • Overrides put · MutableMap

Associates the value with the key and returns the previous value, or None for a new key.

function remove

source · line 100
public
public override fun remove(key: K): V?
  • Overrides remove · MutableMap

Removes the key and returns its former value, or None if absent.

function get

source · line 66
public
public override operator fun get(key: K): V?
  • Overrides get · Map
  • Overrides get

Returns the value associated with the key, or None when absent.

property comparator

source · line 15
public
public override val comparator: Comparator<K>

get: public read-only

The comparator used for ordering and, for ordered maps/sets, equivalence.