Package ro.sync.merge

Class MergeResult

java.lang.Object
ro.sync.merge.MergeResult

@API(type=NOT_EXTENDABLE, src=PUBLIC) public class MergeResult extends Object
Defines the result of a three way merge.
Since:
18.0
  • Constructor Details

    • MergeResult

      public MergeResult(MergeResult.ResultType resultType, String mergedString)
      Constructor.
      Parameters:
      resultType - The type of the merge result.
      mergedString - The merged string.
    • MergeResult

      public MergeResult(MergeResult.ResultType resultType, String mergedString, Boolean mergingOccurred)
      Constructor.
      Parameters:
      resultType - The type of the merge result.
      mergedString - The merged string.
      mergingOccurred - Flag telling whether merging occurred or not. If the two left|right files were identical mergingOccurred will be false;
    • MergeResult

      public MergeResult()
      No arguments constructor.
  • Method Details

    • mergingOccurred

      public boolean mergingOccurred()
      Returns:
      true if merging happened, or false if no merging happened because the given left|right files were identical.
    • getMergedString

      public String getMergedString()
      Returns:
      The merged string.
    • setMergedString

      public void setMergedString(String mergedString)
      Sets the value of the merged string.
      Parameters:
      mergedString - The new merged string.
    • getResultType

      public MergeResult.ResultType getResultType()
      Returns:
      The type of the result.
    • setResultType

      public void setResultType(MergeResult.ResultType result)
      Sets the new value of the result type.
      Parameters:
      result - The new value of the result type.