#import <GPBDictionary.h>
Instance Methods | |
(void) | - addEntriesFromDictionary: |
(instancetype) | - deepCopyWithZone: [implementation] |
(void) | - enumerateKeysAndObjectsUsingBlock: |
(instancetype) | - initWithCapacity: |
(instancetype) | - initWithDictionary: |
(instancetype) | - initWithObjects:forKeys:count: |
(BOOL) | - isInitialized [implementation] |
(ObjectType) | - objectForKey: |
(void) | - removeAll |
(void) | - removeObjectForKey: |
(void) | - setObject:forKey: |
![]() | |
(size_t) | - computeSerializedSizeAsField: |
(void) | - enumerateForTextFormat: |
(void) | - setGPBGenericValue:forGPBGenericValueKey: |
(void) | - writeToCodedOutputStream:asField: |
Protected Attributes | |
__pad0__: NSObject <NSCopying>@property(nonatomic | |
package GPB_UNSAFE_UNRETAINED GPBMessage * | _autocreator |
readonly NSUInteger | count |
Class used for map fields of <int32_t, ObjectType> values. This performs better than boxing into NSNumbers in NSDictionaries.
Definition at line 1805 of file GPBDictionary.h.
- (void) addEntriesFromDictionary: | (GPBInt32ObjectDictionary *) | otherDictionary |
Adds the keys and values from another dictionary.
otherDictionary | Dictionary containing entries to be added to this dictionary. |
|
implementation |
- (void) enumerateKeysAndObjectsUsingBlock: | (void(NS_NOESCAPE ^ block)(int32_t key, ObjectType object, BOOL *stop)) |
Enumerates the keys and values on this dictionary with the given block.
block | The block to enumerate with. key: The key for the current entry. object: The value for the current entry stop: A pointer to a boolean that when set stops the enumeration. |
- (instancetype) initWithCapacity: | (NSUInteger) | numItems |
Initializes this dictionary with the requested capacity.
numItems | Number of items needed for this dictionary. |
- (instancetype) initWithDictionary: | (GPBInt32ObjectDictionary *) | dictionary |
Initializes this dictionary, copying the entries from the given dictionary.
dictionary | Dictionary containing the entries to add to this dictionary. |
- (instancetype) initWithObjects: | (const ObjectType __nonnull GPB_UNSAFE_UNRETAINED) | objects[__nullable] | |
forKeys: | (const int32_t) | keys[__nullable] | |
count: | (NSUInteger) | NS_DESIGNATED_INITIALIZER | |
Initializes this dictionary, copying the given values and keys.
objects | The values to be placed in this dictionary. |
keys | The keys under which to store the values. |
count | The number of elements to copy into the dictionary. |
|
implementation |
- (ObjectType) objectForKey: | (int32_t) | key |
Fetches the object stored under the given key.
key | Key under which the value is stored, if present. |
- (void) removeAll |
Removes all entries in this dictionary.
- (void) removeObjectForKey: | (int32_t) | aKey |
Removes the entry for the given key.
aKey | Key to be removed from this dictionary. |
- (void) setObject: | (ObjectType) | object | |
forKey: | (int32_t) | key | |
Sets the value for the given key.
object | The value to set. |
key | The key under which to store the value. |
|
protected |
Definition at line 1808 of file GPBDictionary.h.
|
protected |
Definition at line 202 of file GPBDictionary_PackagePrivate.h.
|
protected |
Definition at line 1808 of file GPBDictionary.h.