title: Java hashmaps without the value?
body: <p>Let's say I want to put words in a data structure and I want to have constant time lookups to see if the word is in this data structure.  All I want to do is to see if the word exists.  Would I use a <code>HashMap</code> (containsKey()) for this?  <code>HashMap</code>s use key->value pairings, but in my case I don't have a value.  Of course I could use null for the value, but even null takes space.  It seems like there ought to be a better data structure for this application.</p>
  
  <p>The collection could potentially be used by multiple threads, but since the objects contained by the collection would not change, I do not think I have a synchronization/concurrency requirement.</p>
  
  <p>Can anyone help me out?</p>