Class BaseElementComparator

java.lang.Object
com.polarion.qcentre.factbase.delta.compare.BaseElementComparator
All Implemented Interfaces:
IElementComparator
Direct Known Subclasses:
ValueFactElementComparator, ViolationFactElementComparator

public class BaseElementComparator extends Object implements IElementComparator
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    compareContent(IBaseElement baseElement1, IBaseElement baseElement2)
    compareInstance compare if the elements points to same entity (for removed/added comparison) compareContent is called when compareInstance returns true to test if the elements content is the same or if the element is changed
    boolean
    compareInstance compare if the elements points to same entity (for removed/added comparison) compareContent is called when compareInstance returns true to test if the elements content is the same or if the element is changed
    int
    hash code for element to be consistent with compareInstance

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseElementComparator

      public BaseElementComparator()
  • Method Details

    • compareContent

      public boolean compareContent(IBaseElement baseElement1, IBaseElement baseElement2)
      Description copied from interface: IElementComparator
      compareInstance compare if the elements points to same entity (for removed/added comparison) compareContent is called when compareInstance returns true to test if the elements content is the same or if the element is changed
      Specified by:
      compareContent in interface IElementComparator
    • compareInstance

      public boolean compareInstance(IBaseElement element1, IBaseElement element2)
      Description copied from interface: IElementComparator
      compareInstance compare if the elements points to same entity (for removed/added comparison) compareContent is called when compareInstance returns true to test if the elements content is the same or if the element is changed
      Specified by:
      compareInstance in interface IElementComparator
    • hashCode

      public int hashCode(IBaseElement element)
      Description copied from interface: IElementComparator
      hash code for element to be consistent with compareInstance
      Specified by:
      hashCode in interface IElementComparator