Class RecursiveComparator
java.lang.Object
org.assertj.core.api.recursive.comparison.RecursiveComparator
- All Implemented Interfaces:
Comparator<Object>
Comparator comparing objects recursively as in RecursiveComparisonAssert.
This comparator does not enforce any ordering, it just returns 0 if compared objects are equals according the recursive comparison and a non 0 value otherwise.
This comparator honors the RecursiveComparisonConfiguration passed at construction time.
-
Constructor Summary
ConstructorsConstructorDescriptionRecursiveComparator(RecursiveComparisonConfiguration recursiveComparisonConfiguration) Returns a newRecursiveComparatorthat uses the givenRecursiveComparisonConfigurationwhen comparing objects with the recursive comparison. -
Method Summary
Modifier and TypeMethodDescriptionintReturns 0 if the arguments are recursively equal to each other, a non-zero otherwise (no ordering enforced).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
RecursiveComparator
Returns a newRecursiveComparatorthat uses the givenRecursiveComparisonConfigurationwhen comparing objects with the recursive comparison.- Parameters:
recursiveComparisonConfiguration- the usedRecursiveComparisonConfiguration
-
-
Method Details
-
compare
Returns 0 if the arguments are recursively equal to each other, a non-zero otherwise (no ordering enforced).- Specified by:
comparein interfaceComparator<Object>- Parameters:
actual- the object to compare tootherother- the object to compare toactual- Returns:
- 0 if the arguments are recursively equal to each other, a non-zero otherwise.
-
getDescription
-