title: Hash map with 2 values java
body: <p>I need a HashMap some thing which looks like</p>
  
  <pre><code>            Map&lt;String, int,ArrayList&lt;String&gt;&gt; table = new HashMap&lt;String, int,ArrayList&lt;String&gt;&gt;( );
  </code></pre>
  
  <p>But HashMap accepts only one mapped value.</p>
  
  <p>I tried to implement this with some wrapped class which looks like</p>
  
  <pre><code>     class Wrapper {
            int id;
            ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
  
            //Here get and set methods 
      }
  </code></pre>
  
  <p>And then my HashMap looks like</p>
  
  <pre><code>     Map&lt;String, Wrapper&gt; table = new HashMap&lt;String, Wrapper&gt;( );
  </code></pre>
  
  <p><strong>What I need is:</strong></p>
  
  <p>When I specified int value to my HaspMap then I should be able to retrive ArrayList of that int value.</p>
  
  <p>How can I do that?</p>