org.test4j.hamcrest.matcher.property.comparator
类 ListComparator
java.lang.Object
org.test4j.hamcrest.matcher.property.comparator.ListComparator
- 所有已实现的接口:
- Comparator
public class ListComparator
- extends Object
- implements Comparator
Comparator for collections and arrays. All elements are compared in the same
order, i.e. element 1 of the left collection with element 1 of the right
collection and so on.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListComparator
public ListComparator()
canCompare
public boolean canCompare(Object left,
Object right)
- Returns true when both objects are arrays or collections.
- 指定者:
- 接口
Comparator 中的 canCompare
- 参数:
left - The left objectright - The right object
- 返回:
- True in case of arrays/collections
compare
public Difference compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
- Compared the given collections/arrays.
- 指定者:
- 接口
Comparator 中的 compare
- 参数:
left - The left collection/array, not nullright - The right collection/array, not nullonlyFirstDifference - True if only the first difference should be returnedreflectionComparator - The root comparator for inner comparisons, not null
- 返回:
- A CollectionDifference or null if both collections are equal
Copyright © 2013. All rights reserved.