Michael Mirwaldt



All objects are direct or indirect subclasses of the super class "Object". It defines an "equals"-method. This method compares the callee object with a parameter object. If they are regarded as equal, then it returns true, else false. This check can be sufficient for a programmer. However, the return value does not say anything about the differences. It only says that at least one difference was detected at all.
Whenever programmers want to know more, they have to examine the objects on their own. Then they write those individually for every object again and again. They wished objects to have a "diff(...)"-method that delivers information about differences. They might call it after "equals()" if they are optimistic or instead of "equals()" if they are pessimistic.
Optimistic and pessimistic refers their expectation of differences here. An optimistic programmer might expect two objects to be equal. A pessimistic tester might assume differences in opposite.


JDiffUtils compares two items and finds the differences if they exist.

Items can be

  • collections
  • strings
  • bits
  • arrays
  • objects
  • types
  • (swing) models
  • folders
  • xml-files
  • json-strings

JDiffUtils is

  • lightweight
  • simple to use
  • fast
  • very useful


Explanation of "equals()":
Reference implementation of "equals()":


Wiki: Home