LinkedHashMap

An hash map that allows iteration in the insertion-order.

Members

Functions

clear
void clear()

Removes all contents from the LinkedHashMap

dub
LinkedHashMap!(Key, Value) dub()

Create a new LinkedHashMap of the same size and copy the contents of the LinkedHashMap into it.

get
inout(Value) get(Key key, inout(Value) defaultValue)

Looks up key, if it exsists returns the corresponding value else evaluates and returns defaultValue.

opApply
int opApply(int delegate(ref Value) dg)
int opApply(int delegate(ref Key, ref Value) dg)

foreach iteration uses opApply.

opBinaryRight
inout(Value)* opBinaryRight(Key key)

in operator. Check to see if the given element exists in the container.

opEquals
bool opEquals(typeof(this) that)
opIndex
inout(Value) opIndex(Key key)
opIndexAssign
void opIndexAssign(Value value, Key key)
opIndexOpAssign
Value opIndexOpAssign(Value v, Key key)
opIndexUnary
Value opIndexUnary(Key key)

Indexing operators yield or modify the value at a specified index.

rehash
void rehash()

Reorganizes the LinkedHashMap in place so that lookups are more efficient, rehash is effective when, for example, the program is done loading up a symbol table and now needs fast lookups in it.

remove
bool remove(Key key)

remove(key) does nothing if the given key does not exist and returns false. If the given key does exist, it removes it from the HashMap and returns true.

Properties

byKey
auto byKey [@property getter]

Returns a delegate suitable for use as a ForeachAggregate to a ForeachStatement which will iterate over the keys of the LinkedHashMap.

byValue
auto byValue [@property getter]

Returns a delegate suitable for use as a ForeachAggregate to a ForeachStatement which will iterate over the values of the LinkedHashMap.

empty
bool empty [@property getter]
keys
inout(Key)[] keys [@property getter]
length
size_t length [@property getter]
values
inout(Value)[] values [@property getter]

Structs

Node
struct Node
Undocumented in source.

Meta