Class AbstractIdBasedObjectMatcher<T,U extends IComparedObjects<T>>

java.lang.Object
com._1c.g5.v8.dt.compare.matching.AbstractIdBasedObjectMatcher<T,U>
Type Parameters:
T - the type of objects to be matched
U - the type of compared object provider supporting identification
All Implemented Interfaces:
IObjectMatcher<T,U>
Direct Known Subclasses:
AbstractMultiObjectMatcher, AbstractObjectMatcher, BslModuleSectionDescriptionMatcher

public abstract class AbstractIdBasedObjectMatcher<T,U extends IComparedObjects<T>> extends Object implements IObjectMatcher<T,U>
A matcher based on the object identifier.
  • Constructor Details

    • AbstractIdBasedObjectMatcher

      public AbstractIdBasedObjectMatcher()
  • Method Details

    • getId

      protected abstract Object getId(T object, ComparisonSide side)
      For the specified compared object returns its identifier.
      Parameters:
      object - the compared object to get an identifier of its side for, cannot be null
      side - the side of the compared object, cannot be null
      Returns:
      identifier or null if the side is empty
    • createComparedObjectsInstance

      protected abstract U createComparedObjectsInstance()
      Creates an empty instance of compared objects to be filled by the matcher.
      Returns:
      a new intance of compared objects, never null