Working with hashMaps
<p>I want to avoid the use of for loop for iterating through the HaspMap for finding a key and then picking up the value corresponding to that key...Can anyone help me to implement the same...?
Below given is my code using forloop which i would like to replace with containsKey function()</p>

<pre><code> for (Entry&lt;Long, Long&gt; entry : sessionTimeStampHash.entrySet()) 
 //if(sessionTimeStampHash.containsKey(sessionID)) 
 {
    if (entry.getKey().equals(sessionID)) 
    {
        sessionTimeStamp = entry.getValue();
    }
 }
</code></pre>
