title: do I really have to override hash just because I override isEqual: for my subclass?
body: <p>Apple's document says if I override <code>isEqual:</code> then I have to override <code>hash</code> to make sure the hash value should be same for two objects that are consider to be equal by <code>isEqual:</code></p>
  
  <p>Then I read the docs about hash and below is part of it:</p>
  
  <blockquote>
    <p>Therefore, either the hash method must not rely on any of the object’s internal state information or you must make sure the object’s internal state information does not change while the object is in the collection.</p>
  </blockquote>
  
  <p>My customize class MyClass have few of members which are int and bool and NSArray which contains number of MyClass and I want two instance of MyClass to be equal if all of the members are equal.</p>
  
  <p>I have no problem with how to override <code>isEqual:</code> but for <code>hash</code>.
  Of my understanding, <code>hash</code> should calculate the hash value by combine the members' hash value using bit operation such as XOR or rotational shift.</p>
  
  <p>The problem is how to implement <code>hash</code> in a such way that meets the Apple's requirement that mention at above. Docs says that the hash value should not rely be the internal state(which is the members) but I found I have to use them to compute the value.</p>
  
  <p>Or even do I really need to implement it? Because I sure I will not use this class as a key for NSDictionary and this is the only way I know where <code>hash</code> is used.  Are there any other places where <code>hash</code> is used and I should care about it?</p>