A ConcurrentDictonary that maps to the appropriate platform version. More...
Public Member Functions | |
| TValue | addOrUpdate (TKey key, final TValue addValue) |
| Updates a value in the dictionary or adds it if it does not exist. More... | |
| TValue | addOrUpdate (TKey key, TValue addValue, final fm.liveswitch.IFunction2< TKey, TValue, TValue > updateValueFactory) |
| Updates a value in the dictionary or adds it if it does not exist. More... | |
| void | clear () |
| Clears the dictionary of all items. More... | |
| boolean | containsKey (TKey key) |
| True if the dictionary contains the key. More... | |
| int | getCount () |
| Gets the number of items in the dictionary. More... | |
| boolean | getIsEmpty () |
| Gets true if dictionary is empty. More... | |
| java.util.Collection< TKey > | getKeys () |
| Gets an array of keys. More... | |
| TValue | getOrAdd (TKey key, final fm.liveswitch.IFunction1< TKey, TValue > valueFactory) |
| Gets the value from the dictionary or adds a new one if it does not exist. More... | |
| java.util.Collection< TValue > | getValues () |
| Gets an array of Values. More... | |
| ManagedConcurrentDictionary () | |
| Creates a new instance. More... | |
| ManagedConcurrentDictionary (fm.liveswitch.IFunction1< TKey, String > hashCallback) | |
| Creates a new ManagedConcurrentDictionary. More... | |
| boolean | tryAdd (TKey key, TValue value) |
| Tries to add a new value to the dictionary. More... | |
| boolean | tryGetValue (TKey key, fm.liveswitch.Holder< TValue > value) |
| Tries to get a value from the dictionary. More... | |
| boolean | tryRemove (TKey key) |
| Tries and removes a value from the dictionary. More... | |
| boolean | tryRemove (TKey key, fm.liveswitch.Holder< TValue > value) |
| Tries and removes a value from the dictionary. More... | |
| boolean | tryUpdate (TKey key, TValue newValue, TValue comparisonValue) |
| Tries to update the value in the dictionary. More... | |
A ConcurrentDictonary that maps to the appropriate platform version.
| fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.ManagedConcurrentDictionary | ( | ) |
Creates a new instance.
| fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.ManagedConcurrentDictionary | ( | fm.liveswitch.IFunction1< TKey, String > | hashCallback | ) |
Creates a new ManagedConcurrentDictionary.
| hashCallback | The hash function to use when the backing dictionary requires the key to be a string. |
| TValue fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.addOrUpdate | ( | TKey | key, |
| final TValue | addValue | ||
| ) |
Updates a value in the dictionary or adds it if it does not exist.
| key | The key to use for updating for adding. |
| addValue | The value to be added for an absent key. |
| TValue fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.addOrUpdate | ( | TKey | key, |
| TValue | addValue, | ||
| final fm.liveswitch.IFunction2< TKey, TValue, TValue > | updateValueFactory | ||
| ) |
Updates a value in the dictionary or adds it if it does not exist.
| key | The key to use for updating for adding. |
| addValue | The value to be added for an absent key. |
| updateValueFactory | The function to use for generating a value based on an existing key. |
| void fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.clear | ( | ) |
Clears the dictionary of all items.
| boolean fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.containsKey | ( | TKey | key | ) |
True if the dictionary contains the key.
| key | The key to check. |
| int fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.getCount | ( | ) |
Gets the number of items in the dictionary.
| boolean fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.getIsEmpty | ( | ) |
Gets true if dictionary is empty.
| java.util.Collection<TKey> fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.getKeys | ( | ) |
Gets an array of keys.
| TValue fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.getOrAdd | ( | TKey | key, |
| final fm.liveswitch.IFunction1< TKey, TValue > | valueFactory | ||
| ) |
Gets the value from the dictionary or adds a new one if it does not exist.
| key | The key to use when adding to the dictionary. |
| valueFactory | The Func that will create a value if needed. |
| java.util.Collection<TValue> fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.getValues | ( | ) |
Gets an array of Values.
| boolean fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.tryAdd | ( | TKey | key, |
| TValue | value | ||
| ) |
Tries to add a new value to the dictionary.
| key | The key to use when adding. |
| value | The value to be added to the dictionary. |
| boolean fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.tryGetValue | ( | TKey | key, |
| fm.liveswitch.Holder< TValue > | value | ||
| ) |
Tries to get a value from the dictionary.
| key | They key of the item to get form the dictionary. |
| value | The value that was just received or null if failed. |
| boolean fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.tryRemove | ( | TKey | key | ) |
Tries and removes a value from the dictionary.
| key | The key of the item to remove. |
| boolean fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.tryRemove | ( | TKey | key, |
| fm.liveswitch.Holder< TValue > | value | ||
| ) |
Tries and removes a value from the dictionary.
| key | The key of the item to remove. |
| value | The value that was just removed. |
| boolean fm.liveswitch.ManagedConcurrentDictionary< TKey, TValue >.tryUpdate | ( | TKey | key, |
| TValue | newValue, | ||
| TValue | comparisonValue | ||
| ) |
Tries to update the value in the dictionary.
| key | The key to use when updating. |
| newValue | The new value. |
| comparisonValue | The value to compare with the current value in the dictionary. |