LinkedMap

Implements a linked map datastructure. Similar to TreeMap, but instead relies on the equals function, which can mean it can compare keys much easier, meaning much bigger data can be compared easily without hashing. Also it doesn't need to rebalance a tree, which lowers insertion complexity at the cost of higher theoretical access times (n). This linked map has the behavior of putting new elements at the back, resulting in an ordered map similar to what PHP and YAML also has. ovrwrtBhvr changes the overwrite behavior when keymatches are found. If true, then if a key is already existing, then it'll overwrite it at the given position. If false, then the matching key will be first deleted, then the new one will be always put in the end.

Members

Functions

has
bool has(K key)

Returns true if key is found.

has
bool has(K key)

Returns true if key is found.

opApply
int opApply(int delegate(ref E) dg)

opApply override for foreach.

opApply
int opApply(int delegate(K, ref E) dg)

opApply override for foreach.

opApplyReverse
int opApplyReverse(int delegate(ref E) dg)

opApplyReverse override for foreach.

opApplyReverse
int opApplyReverse(int delegate(K, ref E) dg)

opApplyReverse override for foreach.

opBinaryRight
auto opBinaryRight(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinaryRight
auto opBinaryRight(K key)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
E opIndex(K key)

Returns the element with the given key. Returns E.init if not found.

opIndex
E opIndex(K key)

Returns the element with the given key. Returns E.init if not found.

opIndexAssign
auto opIndexAssign(E value, K key)

Assigns a value to the given key.

ptrOf
E* ptrOf(K key)

Returns the pointer of the element with the given key. Returns null if not found.

remove
E remove(K key)

Removes a value with the given key and returns it.

toString
string toString()

Returns the string representation of this container format

Properties

length
size_t length [@property getter]

Returns the number of elements in the LinkedMap.

Static functions

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

Variables

_length
size_t _length;

N. of currently stored elements

last
Node* last;

Last element.

root
Node* root;

Root element.

Meta