# NSMapTable class reference

Albin.L.Jones@Dartmouth.EDU
rfm@gnu.org
Generated at 2025-12-02 21:52:00 +0000
1994, 1995, 1996, 2002, 2009 Free Software Foundation, Inc.
Software documentation for the NSMapTable class
Foundation/NSMapTable.h
NSCopying
NSCoding
NSFastEnumeration
Description forthcoming.
mapTableWithKeyOptions:
keyOptions
valueOptions:
valueOptions
Return a map table initialised using the specified options for keys and values.
strongToStrongObjectsMapTable
Convenience method for creating a map table to store object values using object keys. The collection will retain both the key and the value.
strongToWeakObjectsMapTable
Convenience method for creating a map table to store object values using object keys. The collection will retain the key, the value will be a zeroing weak reference.
weakToStrongObjectsMapTable
Convenience method for creating a map table to store object values using object keys. The collection will retain the value, the key will be a zeroing weak reference.
weakToWeakObjectsMapTable
Convenience method for creating a map table to store object values using object keys. The collection will use zeroing weak references for both the key and the value.
count
Return the number of items stored in the map.
dictionaryRepresentation
Return a dictionary containing the keys and values in the receiver.
initWithKeyOptions:
keyOptions
valueOptions:
valueOptions
capacity:
initialCapacity
Initialiser using option bitmasks to describe the keys and values.
initWithKeyPointerFunctions:
keyFunctions
valuePointerFunctions:
valueFunctions
capacity:
initialCapacity
Initialiser using full pointer function information to describe the keys and values.
keyEnumerator
Return an enumerator able to enumerate the keys in the receiver.
keyPointerFunctions
Return an NSPointerFunctions value describind the functions used by the receiver to handle keys.
objectEnumerator
Return an enumerator able to enumerate the values in the receiver.
objectForKey:
aKey
Return the object stored under the specified key.
removeAllObjects
Empty the receiver of all stored values.
removeObjectForKey:
aKey
Remove the object stored under the specified key.
setObject:
anObject
forKey:
aKey
Store the object under the specified key, replacing any object which was previously stored under that key.
Calling the method with eitther a `nil` key or a `nil` value has no effect.
valuePointerFunctions
Return an NSPointerFunctions value describind the functions used by the receiver to handle values.