Class AbstractChoiceMergeStrategy
- java.lang.Object
-
- org.codehaus.cargo.module.merge.tagstrategy.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 Summary
Constructors Constructor Description AbstractChoiceMergeStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
inBoth(Descriptor set, DescriptorElement left, DescriptorElement right)
Process when the element appears in both descriptors.int
inLeft(Descriptor set, DescriptorElement element)
Process when the element appears just in the left descriptor.int
inRight(Descriptor set, DescriptorElement element)
Process when the element appears just in the right descriptor.
-
-
-
Method Detail
-
inLeft
public int inLeft(Descriptor set, DescriptorElement element)
Process when the element appears just in the left descriptor.- Specified by:
inLeft
in interfaceMergeStrategy
- Parameters:
set
- output descriptorelement
- 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 interfaceMergeStrategy
- Parameters:
set
- output descriptorelement
- 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 interfaceMergeStrategy
- Parameters:
set
- output descriptorleft
- left elementright
- right element- Returns:
- count of merged elements
-
-