title: Usage of HashSet.contains()
body: <p>I have a class with 3 attributes. One of the attributes is used as a unique key , so I use that one key in my <code>equals</code> and <code>hashcode</code> method.</p>
  
  <p>Now once the set is built, during lookup, I have only the primary key (unique key) and I will have to construct a dummy object with unique key and setting other two values to 0 (default values) and then I say </p>
  
  <pre><code>Chapter myObject = new Chapter(uniqueKey,0,0);
  hashSet.contains(myObject); // This will work.
  </code></pre>
  
  <p>Is this a correct usage for Hashset lookup? Is there any other better way because I am not a fan of setting bogus values on a object.</p>