Type Method

sharedKeySet(forKeys:)

Creates a shared key set object for the specified keys.

Declaration

class func sharedKeySet(forKeys keys: [NSCopying]) -> Any

Parameters

keys

The array of keys. If the parameter is nil, an exception is thrown. If the array of keys is empty, an empty key set is returned.

Return Value

A shared key set object.

Discussion

The array of keys may contain duplicates which are quietly ignored. Duplicate hash values of the keys are quietly allowed, but may cause lower performance and increase memory usage.

Typically you would create a shared key set for a given set of keys once, before creating shared key dictionaries, and retain and save the result of this method for use with the NSMutableDictionary class method dictionaryWithSharedKeySet:.