title: Contains and equals
body: <p>I'm a little befuddled by some code:</p>
  
  <pre><code>for (AbstractItem item : mSetOfItems) {
          if (item.equals(pPrimaryItem))
          {
              System.out.println("Contains? " + mSetOfItems.contains(pPrimaryItem));
          }
  }
  </code></pre>
  
  <p>How could it be possible that item.equals(pPrimaryItem) resolves as true, and mSetOfItems.contains(pPrimaryItem) resolves as false? Because that's what I'm seeing in my code.</p>
  
  <p>In other words, if I iterate through my set, I can find an element equal to my test element. But if I use contains, my test elements is not reported being in the set. I'm baffled because I thought contains used equals. What could I be overlooking?</p>