[Previous]
[Up]
[Next]
NSDictionary
Authors
- Richard Frith-Macdonald
-
- Pierre-Yves Rivaille
-
Version: 0.2
Date: 25 April, 2000
Declared in: Foundation/NSDictionary.h
Inherits from: NSObject
Conforms to: NSCoding, NSCopying, NSMutableCopying
+ (id) allocWithZone: (NSZone*)zone
+ (id) dictionary
Returns an empty dictionary.
+ (id) dictionaryWithContentsOfFile: (NSString*)path
Returns a dictionary using the file located at path.
The file must be a property list containing a dictionary as its root object.
+ (id) dictionaryWithDictionary: (NSDictionary*)otherDictionary
Returns a newly created dictionary with the keys and objects of otherDictionary.
(The keys and objects are not copied.)
+ (id) dictionaryWithObject: (id)anObject forKey: (id)aKey
Returns a dictionary containing only one object (anObject) which is associated with aKey.
+ (id) dictionaryWithObjects: (NSArray*)objects forKey: (NSArray*)keys
Returns a dictionary created using the given objects and keys.
The two arrays must have the same size.
The n th element of the objects array is associated with the n th element of the keys array.
+ (id) dictionaryWithObjects: (id*)objects forKeys: (id*)keys count: (unsigned int)count
Returns a dictionary created using the C arrays objects and keys.
The number of elements in both C arrays must be count.
+ (id) dictionaryWithObjectsAndKeys: (id)object, ...
Returns a dictionary created using the list given as argument.
The list is alernately composed of objects and keys.
Thus, the list's length must be pair.
- (NSArray*) allKeys
Returns an array containing all the dictionary's keys.
- (NSArray*) allKeysForObject: (id)anObject
Returns an array containing all the dictionary's keys that are associated with anObject.
- (NSArray*) allValues
Returns an array containing all the dictionary's objects.
- (unsigned int) count
Returns an unsigned integer which is the number of elements stored in the dictionary.
- (NSString*) descriptionInStringsFileFormat
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
- (NSString*) fileGroupOwnerAccountName
- (NSDate*) fileModificationDate
- (NSString*) fileOwnerAccountName
- (unsigned long) filePosixPermissions
- (unsigned long long) fileSize
- (unsigned long) fileSystemFileNumber
- (unsigned long) fileSystemNumber
- (NSString*) fileType
- (id) initWithContentsOfFile: (NSString*)path
see dictionaryWithContentOfFile:
- (id) initWithDictionary: (NSDictionary*)otherDictionary
See dictionaryWithDictionary:
- (id) initWithObjects: (NSArray*)objects
See dictionaryWithObjects:
- (id) initWithObjects: (id*)objects forKeys: (id*)keys count: (unsigned int)count
see dictionaryWithObjects: forKeys: count:
- (id) initWithObjectsAndKeys: (id)object,
see dictionaryWithObjectsAndKeys:
- (BOOL) isEqualToDictionary: (NSDictionary*)otherDictionary
- (NSEnumerator*) keyEnumerator
Return an enumerator object containing all the keys of the dictionary.
- (NSArray*) keysSortedByValueUsingSelector: (SEL)comparator
- (NSEnumerator*) objectEnumerator
Return an enumerator object containing all the keys of the dictionary.
- (id) objectForKey: (id)aKey
Returns the first object which has aKey as key.
- (NSArray*) objectsForKeys: (NSArray*)keys notFoundMarker: (id)anObject
- (BOOL) writeToFile: (NSString*)path atomically: (BOOL)flag