All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.srplib.reflection.deepcompare.DeepComparatorContext Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package org.srplib.reflection.deepcompare;

/**
 * Deep comparator context.
 *
 * 
    *
  • Provides access to root comparator object for DeepComparator implementations.
  • *
  • Provides methods to register mismatches.
  • *
*

Used to

* * @author Anton Pechinsky */ public interface DeepComparatorContext { /** * Compare objects using common comparison infrastructure. * * @param object1 first object * @param object2 second object */ void compare(Object object1, Object object2); /** * Compare objects with object graph path information. * * @param object1 first object * @param object2 second object * @param node String new object graph path segment. This may be field name, collection index, etc. Used to build * mismatch path from root node to current node. */ void compareNested(Object object1, Object object2, String node); /** * Registers mismatch information. * *

Implementation is responsible

* * @param pattern String mismatch message pattern. * @param arguments String mismatch message arguments. */ void registerMismatch(String pattern, Object... arguments); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy