|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
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.
| 方法摘要 | |
|---|---|
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). |
| 方法详细信息 |
|---|
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
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||