public class CollectionComparator extends Object implements Comparator
| Constructor and Description |
|---|
CollectionComparator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCompare(Object left,
Object right)
Returns true when both objects are arrays or collections.
|
Difference |
compare(Object left,
Object right,
boolean onlyFirstDifference,
ReflectionComparator reflectionComparator)
Compared the given collections/arrays.
|
public boolean canCompare(Object left, Object right)
canCompare in interface Comparatorleft - The left objectright - The right objectpublic Difference compare(Object left, 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 nullCopyright © 2016. All Rights Reserved.