I have two maps of type Map<Long, Integer>, one named "old" representing the old state of an object, and the other named "new" representing the new state of the same object.
Is there a simple & readable way of knowing if the old state and the new state are different (ie. if the state has changed)?
Ideally, I'd like some "java.utils" or "Apache Commons" library function like:
hasChanged = !MapUtils.diff(old, new).isEmpty();
Note: I looked for, but didn't find one.
Thanks.