org.codehaus.cargo.module.merge.strategy
Class AbstractChoiceMergeStrategy
java.lang.Object
org.codehaus.cargo.module.merge.strategy.MergeStrategy
org.codehaus.cargo.module.merge.strategy.AbstractChoiceMergeStrategy
- Direct Known Subclasses:
- ChooseByNameMergeStrategy
public abstract class AbstractChoiceMergeStrategy
- extends 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
- Version:
- $Id: $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractChoiceMergeStrategy
public AbstractChoiceMergeStrategy()
inLeft
public int inLeft(AbstractMergeSet set,
org.w3c.dom.Element element)
- Deal with merging an element that only appears in the left set.
- Overrides:
inLeft
in class MergeStrategy
- Parameters:
set
- in the calling MergeSetelement
- in the item present only in the left set
- Returns:
- count of merged items
- See Also:
MergeStrategy.inLeft(org.codehaus.cargo.module.merge.AbstractMergeSet, org.w3c.dom.Element)
inRight
public int inRight(AbstractMergeSet set,
org.w3c.dom.Element element)
- Deal with merging an element that only appears in the right set.
- Overrides:
inRight
in class MergeStrategy
- Parameters:
set
- in the calling MergeSetelement
- in the item present only in the left set
- Returns:
- count of merged items
- See Also:
MergeStrategy.inRight(org.codehaus.cargo.module.merge.AbstractMergeSet, org.w3c.dom.Element)
inBoth
public int inBoth(AbstractMergeSet set,
MergePair pair)
- Deal with merging an element appears in both sets.
- Overrides:
inBoth
in class MergeStrategy
- Parameters:
set
- in the calling MergeSetpair
- the pair of items
- Returns:
- count of merged items
- See Also:
MergeStrategy.inBoth(org.codehaus.cargo.module.merge.AbstractMergeSet, org.codehaus.cargo.module.merge.MergePair)
Copyright © 2004-2009 Codehaus. All Rights Reserved.