title: Which Java object type (collection/list/set/whatever) do I want for this?
body: <p>I want to store a collection of objects that are keyed based upon a value they represent.  These keys <em>can</em> be repeated.  e.g.:</p>
  
  <pre><code> [4] =&gt; Bob
   [5] =&gt; Mary
   [5] =&gt; Sue
   [9] =&gt; Steve
  [10] =&gt; Jason
  [10] =&gt; Michelle
  </code></pre>
  
  <p>Essentially, I want to loop through this and look at each key and say, "is there another object (person in this case) whose key is within 1 from the current key? If so, match them up and remove them from the collection."  I'm going to iterate the "1" value in the example above until the collection is empty (or has one object remaining for odd-numbered scenarios).</p>
  
  <p>I'm not convinced the way I'm trying to go about this is the best way, so I'm open to feedback too.</p>