{@code Diffable} classes can be compared with other objectsfor differences. The {@link DiffResult} object retrieved can be queriedfor a list of differences or printed using the {@link DiffResult#toString()}.
The calculation of the differences is consistent with equals if and only if {@code d1.equals(d2)} implies {@code d1.diff(d2) == ""}. It is strongly recommended that implementations are consistent with equals to avoid confusion. Note that {@code null} is not an instance of any classand {@code d1.diff(null)} should throw a {@code NullPointerException}.
{@code Diffable} classes lend themselves well to unit testing, in which aeasily readable description of the differences between an anticipated result and an actual result can be retrieved. For example:
Assert.assertEquals(expected.diff(result), expected, result);
@param < T> the type of objects that this object may be differentiated against
@since 3.3
@version $Id: Diffable.java 1561225 2014-01-24 23:17:29Z djones $