org.test4j.hamcrest.matcher.property.comparator
类 IgnoreDefaultsComparator
java.lang.Object
org.test4j.hamcrest.matcher.property.comparator.IgnoreDefaultsComparator
- 所有已实现的接口:
- Comparator
public class IgnoreDefaultsComparator
- extends Object
- implements Comparator
A comparator that filters out java-defaults.
If the left object is null, false or 0, both objects are considered equal.
This implements the IGNORE_DEFAULTS comparison mode.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IgnoreDefaultsComparator
public IgnoreDefaultsComparator()
canCompare
public boolean canCompare(Object left,
Object right)
- Returns true if the left object is a java default
- 指定者:
- 接口
Comparator 中的 canCompare
- 参数:
left - The left objectright - The right object
- 返回:
- True if left is null, false or 0
compare
public Difference compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
- Always returns null: both objects are equal.
- 指定者:
- 接口
Comparator 中的 compare
- 参数:
left - The left objectright - The right objectonlyFirstDifference - True if only the first difference should be returnedreflectionComparator - The root comparator for inner comparisons, not null
- 返回:
- null
Copyright © 2013. All rights reserved.