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.
精彩评论