Package org.apache.commons.jrcs.diff
Class MergeVisitor
- java.lang.Object
-
- org.apache.commons.jrcs.diff.MergeVisitor
-
- All Implemented Interfaces:
org.apache.commons.jrcs.diff.RevisionVisitor
public class MergeVisitor extends Object implements org.apache.commons.jrcs.diff.RevisionVisitor
.. makes changes to the revisions it visits, so if a conflict is detected, the revisions should be discarded.TODO: Support ignoring whitespace.
-
-
Constructor Summary
Constructors Constructor Description MergeVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(Object[] orig)Initialise this visitor instance with a copy of the original object array being diffed.voidvisit(org.apache.commons.jrcs.diff.AddDelta delta)Implementation of the Revision Visitor interface.voidvisit(org.apache.commons.jrcs.diff.ChangeDelta delta)Implementation of the Revision Visitor interface.voidvisit(org.apache.commons.jrcs.diff.DeleteDelta delta)Implementation of the Revision Visitor interface.voidvisit(org.apache.commons.jrcs.diff.Revision revision)Implementation of the Revision Visitor interface.booleanwasConflictDetected()Returns true if a conflict was detected.
-
-
-
Method Detail
-
wasConflictDetected
public boolean wasConflictDetected()
Returns true if a conflict was detected.- Returns:
- true if a conflict has been detected, false otherwise.
-
init
public void init(Object[] orig)
Initialise this visitor instance with a copy of the original object array being diffed.- Parameters:
orig-
-
visit
public void visit(org.apache.commons.jrcs.diff.Revision revision)
Implementation of the Revision Visitor interface.- Specified by:
visitin interfaceorg.apache.commons.jrcs.diff.RevisionVisitor- Parameters:
revision-
-
visit
public void visit(org.apache.commons.jrcs.diff.DeleteDelta delta)
Implementation of the Revision Visitor interface.- Specified by:
visitin interfaceorg.apache.commons.jrcs.diff.RevisionVisitor- Parameters:
delta-
-
visit
public void visit(org.apache.commons.jrcs.diff.ChangeDelta delta)
Implementation of the Revision Visitor interface.- Specified by:
visitin interfaceorg.apache.commons.jrcs.diff.RevisionVisitor- Parameters:
delta-
-
visit
public void visit(org.apache.commons.jrcs.diff.AddDelta delta)
Implementation of the Revision Visitor interface.- Specified by:
visitin interfaceorg.apache.commons.jrcs.diff.RevisionVisitor- Parameters:
delta-
-
-