A ConcurrentDictonary that maps to the appropriate platform version. More...
Instance Methods | |
| (TValue) | - addOrUpdateWithKey:addValue:updateValueFactory: |
| Updates a value in the dictionary or adds it if it does not exist. More... | |
| (TValue) | - addOrUpdateWithKey:addValue:updateValueFactoryBlock: |
| Updates a value in the dictionary or adds it if it does not exist. More... | |
| (TKey, TValue) | - addOrUpdateWithKeyAndAddValueAndUpdateValueFactoryBlock |
| Updates a value in the dictionary or adds it if it does not exist. More... | |
| (void) | - clear |
| Clears the dictionary of all items. More... | |
| (bool) | - containsKey: |
| True if the dictionary contains the key. More... | |
| (int) | - count |
| Gets the number of items in the dictionary. More... | |
| (TValue) | - getOrAddWithKey:valueFactory: |
| Gets the value from the dictionary or adds a new one if it does not exist. More... | |
| (TValue) | - getOrAddWithKey:valueFactoryBlock: |
| Gets the value from the dictionary or adds a new one if it does not exist. More... | |
| (TKey) | - getOrAddWithKeyAndValueFactoryBlock |
| Gets the value from the dictionary or adds a new one if it does not exist. More... | |
| (instancetype) | - init |
| Creates a new instance. More... | |
| (instancetype) | - initWithHashCallback: |
| Creates a new ManagedConcurrentDictionary. More... | |
| (instancetype) | - initWithHashCallbackBlock: |
| Creates a new ManagedConcurrentDictionary. More... | |
| (bool) | - isEmpty |
| Gets true if dictionary is empty. More... | |
| (NSMutableArray< TKey > *) | - keys |
| Gets an array of keys. More... | |
| (bool) | - tryAddWithKey:value: |
| Tries to add a new value to the dictionary. More... | |
| (bool) | - tryGetValueWithKey:value: |
| Tries to get a value from the dictionary. More... | |
| (bool) | - tryRemoveWithKey: |
| Tries and removes a value from the dictionary. More... | |
| (bool) | - tryRemoveWithKey:value: |
| Tries and removes a value from the dictionary. More... | |
| (bool) | - tryUpdateWithKey:newValue:comparisonValue: |
| Tries to update the value in the dictionary. More... | |
| (NSMutableArray< TValue > *) | - values |
| Gets an array of Values. More... | |
Class Methods | |
| (FMLiveSwitchManagedConcurrentDictionary *) | + managedConcurrentDictionary |
| Creates a new instance. More... | |
| (FMLiveSwitchManagedConcurrentDictionary *) | + managedConcurrentDictionaryWithHashCallback: |
| Creates a new ManagedConcurrentDictionary. More... | |
| (FMLiveSwitchManagedConcurrentDictionary *) | + managedConcurrentDictionaryWithHashCallbackBlock: |
| Creates a new ManagedConcurrentDictionary. More... | |
Protected Attributes | |
| __pad0__: NSObject- (TValue) addOrUpdateWithKey:(TKey)key addValue:(TValue)addValue | |
A ConcurrentDictonary that maps to the appropriate platform version.
| - (TValue) addOrUpdateWithKey: | (TKey) | key | |
| addValue: | (TValue) | addValue | |
| updateValueFactory: | (FMLiveSwitchFunction2< 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. |
| - (TValue) addOrUpdateWithKey: | (TKey) | key | |
| addValue: | (TValue) | addValue | |
| updateValueFactoryBlock: | (TValue(^)(TKey, TValue)) | updateValueFactoryBlock | |
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. |
| updateValueFactoryBlock | The function to use for generating a value based on an existing key. |
| - (TKey, TValue) addOrUpdateWithKeyAndAddValueAndUpdateValueFactoryBlock |
Updates a value in the dictionary or adds it if it does not exist.
@inlineparam key The key to use for updating for adding. @inlineparam addValue The value to be added for an absent key. @inlineparam updateValueFactoryBlock The function to use for generating a value based on an existing key.
| - (void) clear |
Clears the dictionary of all items.
| - (bool) containsKey: | (TKey) | key |
True if the dictionary contains the key.
| key | The key to check. |
| - (int) count |
Gets the number of items in the dictionary.
| - (TValue) getOrAddWithKey: | (TKey) | key | |
| valueFactory: | (FMLiveSwitchFunction1< 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. |
| - (TValue) getOrAddWithKey: | (TKey) | key | |
| valueFactoryBlock: | (TValue(^)(TKey)) | valueFactoryBlock | |
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. |
| valueFactoryBlock | The Func that will create a value if needed. |
| - (TKey) getOrAddWithKeyAndValueFactoryBlock |
Gets the value from the dictionary or adds a new one if it does not exist.
@inlineparam key The key to use when adding to the dictionary. @inlineparam valueFactoryBlock The Func that will create a value if needed.
| - (instancetype) init |
Creates a new instance.
| - (instancetype) initWithHashCallback: | (FMLiveSwitchFunction1< TKey, NSString * > *) | hashCallback |
Creates a new ManagedConcurrentDictionary.
| hashCallback | The hash function to use when the backing dictionary requires the key to be a string. |
| - (instancetype) initWithHashCallbackBlock: | (NSString *(^)(TKey)) | hashCallbackBlock |
Creates a new ManagedConcurrentDictionary.
| hashCallbackBlock | The hash function to use when the backing dictionary requires the key to be a string. |
| - (bool) isEmpty |
Gets true if dictionary is empty.
| - (NSMutableArray<TKey>*) keys |
Gets an array of keys.
| + (FMLiveSwitchManagedConcurrentDictionary*) managedConcurrentDictionary |
Creates a new instance.
| + (FMLiveSwitchManagedConcurrentDictionary*) managedConcurrentDictionaryWithHashCallback: | (FMLiveSwitchFunction1< TKey, NSString * > *) | hashCallback |
Creates a new ManagedConcurrentDictionary.
| hashCallback | The hash function to use when the backing dictionary requires the key to be a string. |
| + (FMLiveSwitchManagedConcurrentDictionary*) managedConcurrentDictionaryWithHashCallbackBlock: | (NSString *(^)(TKey)) | hashCallbackBlock |
Creates a new ManagedConcurrentDictionary.
| hashCallbackBlock | The hash function to use when the backing dictionary requires the key to be a string. |
| - (bool) tryAddWithKey: | (TKey) | key | |
| value: | (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. |
| - (bool) tryGetValueWithKey: | (TKey) | key | |
| value: | (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. |
| - (bool) tryRemoveWithKey: | (TKey) | key |
Tries and removes a value from the dictionary.
| key | The key of the item to remove. |
| - (bool) tryRemoveWithKey: | (TKey) | key | |
| value: | (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. |
| - (bool) tryUpdateWithKey: | (TKey) | key | |
| newValue: | (TValue) | newValue | |
| comparisonValue: | (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. |
| - (NSMutableArray<TValue>*) values |
Gets an array of Values.
|
protected |