MPMutableDictionary |
A subclass of NSMutableDictionary that is the base of most MacPort API objects
Superclass: NSMutableDictionary
Declared In: MPMutableDictionary.h
The dictionary data structure is appropriate for representing various aspects of the MacPorts system such as port objects, receipt objects etc. Clients of this framework can treat subclasses of MPMutableDictionary objects as NSMutableDictionaries which can be useful for some GUI programming tasks like displaying information in a table. In order to properly subclass an NSMutableDictionary, this class also contains an internal NSMutableDictionary object. See http://www.smackie.org/Notes/2007/07/11/subclassing-nsmutabledictionary/ for some more information on subclassing NSMutableDictionary.
init |
Calls [initWithCapacity:15]
- (id)init;
initWithCapacity: |
Initializes this object with a specified number of key, value pairs.
- (id)initWithCapacity:(unsigned)numItems;
numItems
count |
Returns the size of this mutable dictionary
- (unsigned)count;
keyEnumerator |
Returns an NSEnumerator object for accessing keys in the mutable dictionary
- (NSEnumerator *)keyEnumerator;
objectForKey: |
Returns the object associated with a given key
- (id)objectForKey:(id)aKey;
aKey
removeObjectForKey: |
Removes a given key and its associated object from the mutable dictionary
- (void)removeObjectForKey:(id)aKey;
aKey
setObject:forKey: |
Adds a given key and its associated object to the mutable dictionary.
- (void)setObject:(id)anObject forKey:(id)aKey;
anObject
aKey
This class uses an embedded NSMutableDictionary for implementing these primitive methods. Hence restrictions to setObject: forKey: for NSMutableDictionary apply here also; for example, anObject cannot be nil.
setDictionary: |
Sets the contents of the mutable dictionary to entries in a given dictionary
- (void)setDictionary:(NSDictionary *)otherDictionary;
otherDictionary
description |
Returns an NSString representation of the contents of this mubtable dictioanry, formatted as a property list.
- (NSString *)description;
Last Updated: Sunday, July 13, 2008