This function works like: // laa is an instance of LazedAssocArray laa["key"] = new T; with following way: laa.insert!("key", "new T");
Make an alias of the key
An overloaded function of opIndex This function hooks: laa["key"] event.
An overloaded function of opIndexAssing This function hooks: laa["key"] = value; event but this function might be no use
Set the value with the key. This function works like: laa["key"] = value; with laa.set("key", value)
Flags, indicates whether the instance of the key is already created
This variable holds the constructor calling delegate to make the instance which will be called when the isntance become needed.
This variable holds the instance as a value of hashmap.
Lazed Associative Array
For instance; assocArray["key"] = new ValueType The above code create a new instance of ValueType with some consts(memory amount and time). However it likely to be a bobottleneck if the value isn't needed. Then this class provides lazed associative array, this class willn't create an instance until the value become needed. In other words, this is sort of lazy evaluation for performance.