|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.reflectionassert.comparator.impl.CollectionComparator
public class CollectionComparator
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.
| Constructor Summary | |
|---|---|
CollectionComparator()
|
|
| Method Summary | |
|---|---|
boolean |
canCompare(java.lang.Object left,
java.lang.Object right)
Returns true when both objects are arrays or collections. |
Difference |
compare(java.lang.Object left,
java.lang.Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compared the given collections/arrays. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionComparator()
| Method Detail |
|---|
public boolean canCompare(java.lang.Object left,
java.lang.Object right)
canCompare in interface Comparatorleft - The left objectright - The right object
public Difference compare(java.lang.Object left,
java.lang.Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
compare in interface Comparatorleft - 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||