Class LightweightComparisonProcessHandle


  • public class LightweightComparisonProcessHandle
    extends Object
    The lightweight comparison process handle, stores the comparison data source descriptors and the comparison scope id.
    • Constructor Detail

      • LightweightComparisonProcessHandle

        public LightweightComparisonProcessHandle​(IComparisonDataSourceDescriptor mainDescriptor,
                                                  IComparisonDataSourceDescriptor otherDescriptor,
                                                  IComparisonDataSourceDescriptor ancestorDescriptor)
        Creates a new instance.
        Parameters:
        mainDescriptor - the main data source descriptor, cannot be null
        otherDescriptor - the other data source descriptor, cannot be null
        ancestorDescriptor - the common ancestor data source descriptor, may be null for two-way comparison
      • LightweightComparisonProcessHandle

        public LightweightComparisonProcessHandle​(IComparisonDataSourceDescriptor mainDescriptor,
                                                  IComparisonDataSourceDescriptor otherDescriptor,
                                                  IComparisonDataSourceDescriptor ancestorDescriptor,
                                                  UUID comparisonScopeId)
        Creates a new instance.
        Parameters:
        mainDescriptor - the main data source descriptor, cannot be null
        otherDescriptor - the other data source descriptor, cannot be null
        ancestorDescriptor - the common ancestor data source descriptor, may be null for two-way comparison
        comparisonScopeId - the comparison scope id, cannot be null
    • Method Detail

      • isThreeWay

        public boolean isThreeWay()
        Checks whether the comparison is three-way.
        Returns:
        true if the comparison is three-way, false if the comparison is two-way
        See Also:
        getCommonAncestorDescriptor()
      • getDescriptor

        public IComparisonDataSourceDescriptor getDescriptor​(ComparisonSide side)
        Returns the comparison data source descriptor on the specified side.
        Parameters:
        side - the comparison side to get descriptor on, cannot be null
        Returns:
        the main comparison data source descriptor, may be null
      • getMainDescriptor

        public IComparisonDataSourceDescriptor getMainDescriptor()
        Returns the main comparison data source descriptor.
        Returns:
        the main comparison data source descriptor, never null
      • getOtherDescriptor

        public IComparisonDataSourceDescriptor getOtherDescriptor()
        Returns the other comparison data source descriptor.
        Returns:
        the other comparison data source descriptor, never null
      • getCommonAncestorDescriptor

        public IComparisonDataSourceDescriptor getCommonAncestorDescriptor()
        Returns the common ancestor data source descriptor. Presents only in three-way comparison.
        Returns:
        the common ancestor comparison data source descriptor or null for two-way comparison
      • getComparisonScopeId

        public UUID getComparisonScopeId()
        Returns the comparison scope id.
        Returns:
        the comparison scope id, never null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object