title: How to create a 2 way map in java
body: <p>I need a data structure to store string-int value pairs in an 1:1 relationship, and being able too look up from either way their counterpart.</p>
  
  <p>I wrote a class with a Hashtable and a String array and stored the data 2 times and used the built in functions for lookup.</p>
  
  <p>My question is that is there a nicer way to accomplish this? And by nicer I mean being efficient and not storing the data 2 times, and preferably without writing a ton of code either :P.</p>