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 and returns zero if the compared objects are equals, according to the recursive comparison, or a non-zero value otherwise.
- Since:
- 3.24.0
-
Constructor Summary
ConstructorsConstructorDescriptionReturns a newRecursiveComparatorthat uses the defaultRecursiveComparisonConfigurationwhen comparing objects with the recursive comparison.RecursiveComparator(RecursiveComparisonConfiguration recursiveComparisonConfiguration) Returns a newRecursiveComparatorthat uses the givenRecursiveComparisonConfigurationwhen comparing objects with the recursive comparison. -
Method Summary
Modifier and TypeMethodDescriptionintReturns zero if the arguments are recursively equal to each other, or 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
public RecursiveComparator()Returns a newRecursiveComparatorthat uses the defaultRecursiveComparisonConfigurationwhen comparing objects with the recursive comparison.- Since:
- 3.25.0
-
RecursiveComparator
Returns a newRecursiveComparatorthat uses the givenRecursiveComparisonConfigurationwhen comparing objects with the recursive comparison.- Parameters:
recursiveComparisonConfiguration- theRecursiveComparisonConfigurationinstance to be used
-
-
Method Details
-
getDescription
-
compare
Returns zero if the arguments are recursively equal to each other, or non-zero otherwise (no ordering enforced).- Specified by:
comparein interfaceComparator<Object>- Parameters:
actual- the object to compare tootherother- the object to compare toactual- Returns:
- zero if the arguments are recursively equal to each other, or non-zero otherwise.
-