title: How to move values around in a HashMap
body: <p>I have class, lets say Hockey. The Hockey class will set the hockey's score like the code below:</p>
  
  <pre><code>public class Hockey{
    private HashMap&lt;String, Integer&gt; hockeyScore;
  
    public Hockey(){
      hockeyScore = new HashMap&lt;String, Integer&gt;();
    }
  
    public void setHockeyScore(String clubName, int score){
      hockeyScore.put(clubName, score);  
    }
  }
  </code></pre>
  
  <p>A hockey game will only have two teams and two scores, is it possible to swap the scores?
  For example when we insert into hashmap and it comes out with the keys and values...</p>
  
  <blockquote>
    <p>team 'a' = 23</p>
    
    <p>team 'b' = 10</p>
  </blockquote>
  
  <p>then you swap the values in the hashmap which will look like...</p>
  
  <blockquote>
    <p>team 'a' = 10</p>
    
    <p>team 'b' = 23</p>
  </blockquote>
  
  <p>Sorry guys, I was wondering if there is a like a method that swaps the scores around, without manually using the 'a' and 'b' reference. Like once you insert any keys and values into the hashmap, this method will swap the values around.</p>