org.codehaus.cargo.module.merge
Class AbstractMergeSet

java.lang.Object
  extended byorg.codehaus.cargo.module.merge.AbstractMergeSet
Direct Known Subclasses:
MergeElement, MergeNodeList

public abstract class AbstractMergeSet
extends java.lang.Object

Abstract class containing a set of items that need to be merged, split up into items that just appear in the left-hand side, those in the right-hand side, and those that are in both (potential conflicts).

Version:
$Id $

Field Summary
 java.util.List inBoth
          Items in both sides (conflicts).
 java.util.List inLeftOnly
          Items just in the left hand side.
 java.util.List inRightOnly
          Items just in the right hand side.
 
Constructor Summary
AbstractMergeSet()
           
 
Method Summary
abstract  void add(org.w3c.dom.Element e)
          As a result of the merge, add an element to the output.
 int merge(MergeStrategy action)
          Perform the merge using the passed strategy.
abstract  void remove(org.w3c.dom.Element e)
          As a result of the merge, remove an element from the output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inLeftOnly

public java.util.List inLeftOnly
Items just in the left hand side.


inRightOnly

public java.util.List inRightOnly
Items just in the right hand side.


inBoth

public java.util.List inBoth
Items in both sides (conflicts).

Constructor Detail

AbstractMergeSet

public AbstractMergeSet()
Method Detail

merge

public int merge(MergeStrategy action)
Perform the merge using the passed strategy.

Parameters:
action - in the strategy to use when merging
Returns:
the count of merges performed

add

public abstract void add(org.w3c.dom.Element e)
As a result of the merge, add an element to the output.

Parameters:
e - the element to be added

remove

public abstract void remove(org.w3c.dom.Element e)
As a result of the merge, remove an element from the output.

Parameters:
e - the element to be removed


Copyright © 2004-2008 Codehaus. All Rights Reserved.