Class MergeManagerResult<R,​C>

  • Type Parameters:
    R - the type of the merge result
    C - the type of the conflicts
    Direct Known Subclasses:
    MergeDocumentResult

    public class MergeManagerResult<R,​C>
    extends Object
    This represents the result of a merge operation: it contains both the result of the merge, the possible conflicts that happened during the merge, and the logs.

    The merge result and the conflict might have distinct types: for example, a merge performed on String by splitting it by characters, will expect a String result type, but a Character conflict type.

    Since:
    11.8RC1
    Version:
    $Id: b24e0b26ef389d5be6768befa28ed9a57c2b29a9 $
    • Constructor Detail

      • MergeManagerResult

        public MergeManagerResult()
        Default constructor.
    • Method Detail

      • isModified

        public boolean isModified()
        Returns:
        true if the merge result version is different than the current one.
      • setModified

        public void setModified​(boolean modified)
        Parameters:
        modified - set true if the merge result is different than the current version.
      • addConflicts

        public void addConflicts​(List<org.xwiki.diff.Conflict<C>> conflicts)
        Add some conflicts returned by a MergeResult inside this result.
        Parameters:
        conflicts - the conflicts to add
      • getConflicts

        public List<org.xwiki.diff.Conflict<C>> getConflicts()
        Returns:
        all the conflicts occured during this merge
      • setMergeResult

        public void setMergeResult​(R result)
        Set the result obtained during the merge.
        Parameters:
        result - the result of the merge operation.
      • getMergeResult

        public R getMergeResult()
        Returns:
        the resulted object of the merge.
      • setLog

        @Unstable
        public void setLog​(org.xwiki.logging.LogQueue logQueue)
        Specify the log queue to be used: this method should mainly be used when wrapping a result.
        Parameters:
        logQueue - the log queue to be used.
        Since:
        14.10.7, 15.2RC1
      • getLog

        public org.xwiki.logging.LogQueue getLog()
        Returns:
        the log associated to the merge
      • hasConflicts

        public boolean hasConflicts()
        Returns:
        true if at least one conflict occured during the merge operation.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object