|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Comparator
Interface for comparing 2 given objects.
One should always first call canCompare before calling compare to perform the actual comparison. If canCompare returns false, the comparator implementation is not suited to compare the given objects and compare should not be called.
Method Summary | |
---|---|
boolean |
canCompare(Object left,
Object right)
Checks whether this comparator can compare the given objects. |
Difference |
compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compares the given objects and returns the difference (if any). |
Method Detail |
---|
boolean canCompare(Object left, Object right)
left
- The left objectright
- The right object
Difference compare(Object left, Object right, boolean onlyFirstDifference, ReflectionComparator reflectionComparator)
left
- The left objectright
- The right objectonlyFirstDifference
- True if only the first difference should be returnedreflectionComparator
- The root comparator for inner comparisons, not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |