Package ro.sync.merge
Class MergeResult
- java.lang.Object
-
- ro.sync.merge.MergeResult
-
@API(type=NOT_EXTENDABLE, src=PUBLIC) public class MergeResult extends java.lang.Object
Defines the result of a three way merge.- Since:
- 18.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MergeResult.ResultType
The way a merge has finalized.
-
Constructor Summary
Constructors Constructor Description MergeResult()
No arguments constructor.MergeResult(MergeResult.ResultType resultType, java.lang.String mergedString)
Constructor.MergeResult(MergeResult.ResultType resultType, java.lang.String mergedString, java.lang.Boolean mergingOccurred)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMergedString()
MergeResult.ResultType
getResultType()
boolean
mergingOccurred()
void
setMergedString(java.lang.String mergedString)
Sets the value of the merged string.void
setResultType(MergeResult.ResultType result)
Sets the new value of the result type.
-
-
-
Constructor Detail
-
MergeResult
public MergeResult(MergeResult.ResultType resultType, java.lang.String mergedString)
Constructor.- Parameters:
resultType
- The type of the merge result.mergedString
- The merged string.
-
MergeResult
public MergeResult(MergeResult.ResultType resultType, java.lang.String mergedString, java.lang.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 identicalmergingOccurred
will be false;
-
MergeResult
public MergeResult()
No arguments constructor.
-
-
Method Detail
-
mergingOccurred
public boolean mergingOccurred()
- Returns:
true
if merging happened, orfalse
if no merging happened because the given left|right files were identical.
-
getMergedString
public java.lang.String getMergedString()
- Returns:
- The merged string.
-
setMergedString
public void setMergedString(java.lang.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.
-
-