title: Find a object key from a HashMap
body: <p>I have a HashMap having key as my own object and key as ArrayList of String. Is there a way to get the key object from the map which is equal to another object without iterating the map. Please note that my object has implemented equals &amp; hashcode. And it only uses 2 attribute of the class to compare. The another object which I am trying to find in the keys of the map has those 2 attribute equal but the other attributes may be different in the key of the map. </p>
  
  <pre><code>//The actual map
  private HashMap&lt;FileDetail, ArrayList&lt;String&gt;&gt; map = new HashMap&lt;FileDetail, ArrayList&lt;String&gt;&gt;();
  //object to search in above map without iteration.
  FileDetail file = some object;
  </code></pre>
  
  <p>I want to get the reference of the "file" object in the keys of the map.</p>