org.srplib.reflection.deepcompare.DeepComparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of srp-reflection-support Show documentation
Show all versions of srp-reflection-support Show documentation
Single Responsibility Principle (SRP) libraries collection
package org.srplib.reflection.deepcompare;
/**
* Interface for deep object comparator.
*
* Used to implements comparison logic for particular class or class hierarchy.
*
* @author Anton Pechinsky
*/
public interface DeepComparator {
/**
* Compares two objects.
*
*
* Implementation performs object comparison logic and delegates mismatch registration and nested object comparison to
* to {@code context}.
*
*
* @param object1 first object
* @param object2 second object
* @param context comparison context .
*/
void compare(T object1, T object2, DeepComparatorContext context);
}