T- the type of objects that this object may be differentiated against
public interface Diffable<T>
The calculation of the differences is consistent with equals if
and only if
d1.diff(d2) == "".
It is strongly recommended that implementations are consistent with equals
to avoid confusion. Note that
null is not an instance of any class
d1.diff(null) should throw a
Diffable classes lend themselves well to unit testing, in which a
easily 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);
Copyright © 2001–2016 The Apache Software Foundation. All rights reserved.