class ObservableStringDictionary extends StringDictionary
This will clear this dictionary and copy the content from the 'source' one.
If the T value is a custom object, it won't be copied/cloned, the same object will be used
|source||StringDictionary<T>||the dictionary to take the content from and copy to this dictionary|
Get a value from its key or add it if it doesn't exist.
This method will ensure you that a given key/data will be present in the dictionary.
The factory will only be invoked if there's no data for the given key.
@return the value corresponding to the key.
|key||string||the given key to get the matching value from|
|factory||(key: string) => T||the factory that will create the value if the key is not present in the dictionary.|
Add a new key and its corresponding value
@return true if the operation completed successfully, false if we couldn't insert the key/value because there was already this key in the dictionary
|key||string||the key to add|
|value||T||the value corresponding to the key|
Remove a key/value from the dictionary.
@return true if the item was successfully deleted, false if no item with such key exist in the dictionary
|key||string||the key to remove|
Clear the whole content of the dictionary