TreeMap

A key→value mapping where the keys are guaranteed to be sorted.

Constructors

this
this()

No default construction if an allocator must be provided.

this
this(Allocator allocator)

Use the given allocator for allocations.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Aliases

opIndexAssign
alias opIndexAssign = insert

Supports treeMapkey = value; syntax.

Functions

containsKey
bool containsKey(K key)
empty
bool empty()
insert
void insert(V value, K key)

Inserts the given key-value pair.

keys
auto keys()
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length()
opApply
int opApply(int delegate(ref K, ref V) loopBody)

Supports foreach(k, v; treeMap) syntax.

opIndex
auto opIndex(K key)

Supports treeMapkey syntax.

remove
bool remove(K key)

Removes the key→value mapping for the given key.

values
auto values()
Undocumented in source. Be warned that the author may not have intended to support it.

Parameters

K

the key type

V

the value type

Allocator

the allocator to use. Defaults to Mallocator.

less

the key comparison function to use

supportGC

true to support storing GC-allocated objects, false otherwise

cacheLineSize

the size of the internal nodes in bytes

Meta