title: how to subtract values in a single hashmap while iterating over the map
body: <p>I have a hashmap containing the food requirement of an individual B for each month as below:</p>
  
  <pre><code>Map&lt;String,Float&gt; profileMap = new LinkedHashMap&lt;String,Float&gt;();
  
  map.put("B_JAN",8);
  map.put("B_FEB",10);
  map.put("B_MAR",8);
  // ...
  </code></pre>
  
  <p>and so on till DEC</p>
  
  <p>I need to create a new map which will show the consumption for each month. Consumption is calculated by subtracting the current month value from previous month value. So my result should be something like:</p>
  
  <p>{"B_JAN":8,"B_FEB":2,"B_MAR":-2} and so on.</p>
  
  <p>How can I do this calculation while iterating over the map?</p>