title: Filling HashMaps <Object, Collection<Object>>
body: <p>i've a problem by filling the <code>Hashmap&lt;Object, Collection&lt;Object&gt;&gt;</code>. 
  every time i want to fill the value part of the HashMap(in this case the Collection) my object, which needs to be added to the Collection, only takes the last received value of the object. 
  for example my code is like this(Using LastFM API): </p>
  
  <pre><code>Map&lt;Object, Collection&lt;Tag&gt;&gt; tracksTags = new HashMap&lt;Track, Collection&lt;Tag&gt;&gt;();
  Collection&lt;Track&gt; trackSet = tracks.getPageResults();
  Collection&lt;Tag&gt; tags  = new HashSet&lt;Tag&gt;();
  
  String artist = "";
  String trackTitle = "";
  
  int counter = 0;
  
  for (Track track : trackSet) {
      tags.clear();
  
      artist = track.getArtist();
      trackTitle = track.getName();
  
      Collection&lt;Tag&gt; tagList = Track.getTopTags(artist, trackTitle,
                  apiKey);
  
      for (Tag tag : tagList) {
              if (counter &lt;= 9) {
  
                  counter++;
  
                  System.out.println(trackTitle + " " + tag.getName() + " "
                          + tag.getCount());
                  tags.add(tag);
  
              } else
                  break;
      }
      counter = 0;
  
      tracksTags.put(track, tags);
  
  
  }
  </code></pre>
  
  <p>My problem is that <strong>tags</strong> only takes the value of the last retrieval... still have no idea why. Even i dont know if it is a Hashmap-Filling problem.</p>
  
  <p>Would appreciate any help.</p>