开发者

Recommended hash function for overwriting NSObject's hash method

开发者 https://www.devze.com 2023-03-03 04:20 出处:网络
What\'s a good hash function for o开发者_如何学JAVAverwriting NSObject\'s hash method in your custom classes?Here is a good community wiki page discussing overwriting the functions Implementing -hash

What's a good hash function for o开发者_如何学JAVAverwriting NSObject's hash method in your custom classes?


Here is a good community wiki page discussing overwriting the functions Implementing -hash / -isEqual: / -isEqualTo...: for Objective-C collections.
And there is an implementation on one of the linked articles Best practices for overriding isEqual: and hash.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号