title: How can I update values in a map?
body: <p>I am using a <code>TreeMap&lt;Integer,Object&gt;()</code> to store values.<br>
  Now my <code>Object</code> has a component, <code>Object.value()</code>, which keeps getting incremented as per values read from a file.<br>
  <strong>So</strong>, I evaluate whether the key exists and need to update value.<br>
  I do not understand how I can update values in a <code>Map</code> in Java.<br>
  I cannot just replace the whole record, as new values need to be added to the existing record value.<br>
  Is there a better way to do this than using a map? I used a map because I will keep searching for the keys.<br>
  Any suggestions?</p>