Class AbstractChoiceMergeStrategy

  • All Implemented Interfaces:
    MergeStrategy
    Direct Known Subclasses:
    ChooseByNameMergeStrategy

    public abstract class AbstractChoiceMergeStrategy
    extends Object
    implements MergeStrategy
    A merging strategy that can make a decision between various differing merge strategies, depending upon the state that it is passed. Child classes implement the getApplicableStrategy based on whatever information is neccessary to make that decision
    • Constructor Detail

      • AbstractChoiceMergeStrategy

        public AbstractChoiceMergeStrategy()
    • Method Detail

      • inLeft

        public int inLeft​(Descriptor set,
                          DescriptorElement element)
        Process when the element appears just in the left descriptor.
        Specified by:
        inLeft in interface MergeStrategy
        Parameters:
        set - output descriptor
        element - left element
        Returns:
        count of merged elements
      • inRight

        public int inRight​(Descriptor set,
                           DescriptorElement element)
        Process when the element appears just in the right descriptor.
        Specified by:
        inRight in interface MergeStrategy
        Parameters:
        set - output descriptor
        element - right element
        Returns:
        count of merged elements
      • inBoth

        public int inBoth​(Descriptor set,
                          DescriptorElement left,
                          DescriptorElement right)
        Process when the element appears in both descriptors.
        Specified by:
        inBoth in interface MergeStrategy
        Parameters:
        set - output descriptor
        left - left element
        right - right element
        Returns:
        count of merged elements