title: Readable way of knowing if there is at least one difference between two Map<Long, Integer> in Java?
body: <p>I have two maps of type Map&lt;Long, Integer&gt;, one named "oldValues" representing the old state of an object, and the other named "newValues" representing the new state of the same object.</p>
  
  <p>Is there a simple &amp; readable way of knowing if the old state and the new state are different (ie. if the state has changed)?</p>
  
  <p>Ideally, I'd like some "java.utils" or "Apache Commons" library function like:</p>
  
  <pre><code>hasChanged = !MapUtils.diff(oldValues, newValues).isEmpty();
  </code></pre>
  
  <p>Note: I looked for, but didn't find one.</p>
  
  <p>Thanks.</p>