Contents

NSMapInsertIfAbsent(_:_:_:)

Inserts a key-value pair into the specified table.

Declaration

func NSMapInsertIfAbsent(_ table: NSMapTable<AnyObject, AnyObject>, _ key: UnsafeRawPointer?, _ value: UnsafeRawPointer?) -> UnsafeMutableRawPointer?

Return Value

If key matches a key already in table, the preexisting value; otherwise, key and value are added to table and returns NULL.

Discussion

Raises NSInvalidArgumentException if key is equal to the notAKeyMarker field of the table’s NSMapTableKeyCallBacks structure.

See Also

Related Documentation

Functions