title: key value pair implementation in java?
body: <p>Is there something like a <code>KeyValuePair</code> in Java?</p>
  
  <p>I have a Very long list of elements of the following class:</p>
  
  <pre><code>public class Foo {
      int id;
      Set&lt;String&gt; items;
  }
  </code></pre>
  
  <p>which is stored here:</p>
  
  <pre><code>LinkedList&lt;Foo&gt; myList;
  </code></pre>
  
  <p>each time I search for a item, I iterate over the list and search for the Item, but this takes to much time.
  I want to do something like this:</p>
  
  <pre><code>myList.get(123) =&gt; items of the Foo with id = 123
  </code></pre>