Class 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
      void init​(Object[] orig)
      Initialise this visitor instance with a copy of the original object array being diffed.
      void visit​(org.apache.commons.jrcs.diff.AddDelta delta)
      Implementation of the Revision Visitor interface.
      void visit​(org.apache.commons.jrcs.diff.ChangeDelta delta)
      Implementation of the Revision Visitor interface.
      void visit​(org.apache.commons.jrcs.diff.DeleteDelta delta)
      Implementation of the Revision Visitor interface.
      void visit​(org.apache.commons.jrcs.diff.Revision revision)
      Implementation of the Revision Visitor interface.
      boolean wasConflictDetected()
      Returns true if a conflict was detected.
    • Constructor Detail

      • MergeVisitor

        public MergeVisitor()
    • 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:
        visit in interface org.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:
        visit in interface org.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:
        visit in interface org.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:
        visit in interface org.apache.commons.jrcs.diff.RevisionVisitor
        Parameters:
        delta -