Class ComparisonProcessHandle


  • public final class ComparisonProcessHandle
    extends Object
    A handle of a comparison process with two or three descriptors of data sources being compared and a comparison scope.
    • Constructor Detail

      • ComparisonProcessHandle

        public ComparisonProcessHandle​(IComparisonDataSourceDescriptor mainDescriptor,
                                       IComparisonDataSourceDescriptor otherDescriptor,
                                       ComparisonScope comparisonScope)
        Constructs a two-way comparison handle.
        Parameters:
        mainDescriptor - the main data source descriptor, not null
        otherDescriptor - the other data source descriptor, not null
        comparisonScope - the comparison scope, not null
      • ComparisonProcessHandle

        public ComparisonProcessHandle​(IComparisonDataSourceDescriptor mainDescriptor,
                                       IComparisonDataSourceDescriptor otherDescriptor,
                                       IComparisonDataSourceDescriptor ancestorDescriptor,
                                       ComparisonScope comparisonScope)
        Constructs a comparison handle.
        Parameters:
        mainDescriptor - the main data source descriptor, not null
        otherDescriptor - the other data source descriptor, not null
        ancestorDescriptor - the common ancestor data source descriptor, may be null for two-way comparison
        comparisonScope - the comparison scope, not null
    • Method Detail

      • isThreeWay

        public boolean isThreeWay()
        Returns true if the comparison is three-way.
        Returns:
        true if the comparison is three-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, not null
      • getOtherDescriptor

        public IComparisonDataSourceDescriptor getOtherDescriptor()
        Returns the other comparison data source descriptor.
        Returns:
        the other comparison data source descriptor, not 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
      • getScope

        public List<String> getScope​(ComparisonSide side)
        Returns the list of objects (in the form of their symbolic links) comprising the comparison scope for the specified side.
        Parameters:
        side - the side of the scope objects, can not be null
        Returns:
        a list of FQNs of the scope objects, never null
      • extendScope

        public void extendScope​(String symlink,
                                ComparisonSide side)
        Extends the comparison scope by new symlink.
        Parameters:
        symlink - the symlink to add to the scope, cannot be null
        side - the side of the scope objects, cannot be null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object