public class DefaultDiffEngine extends java.lang.Object implements DiffEngine
DiffEngine.DiffLine
DELETED, NEW, UNCHANGED, UPDATED
TYPE_FULL_LINES, TYPE_WITHIN_LINES_BASIC, TYPE_WITHIN_LINES_DIFF
Constructor and Description |
---|
DefaultDiffEngine(java.util.List<java.lang.String> leftV,
java.util.List<java.lang.String> rightV) |
Modifier and Type | Method and Description |
---|---|
short |
getDiffAlgorithm()
Return the diff algorithm
|
java.util.List<DiffEngine.DiffLine> |
getLeftDiffLines()
Return the left diff lines.
|
java.util.List<java.lang.String> |
getLeftText()
Return the left text.
|
java.util.List<DiffEngine.DiffLine> |
getRightDiffLines()
Return the right diff lines.
|
java.util.List<java.lang.String> |
getRightText()
Return the right text.
|
boolean |
notExistingLinesAsSpace()
Return true if not existing lines should be represented as a null String.
|
void |
populate(DiffBase diffbase)
Populate the diff.
|
void |
setDiffAlgorithm(short diffAlgorithm)
Set the diff algorithm.
|
void |
setNotExistingLinesAsSpace(boolean notExistingLinesAsSpace)
Set if not existing lines should be represented as a null String.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDiffResult, getNewLine, populate
public DefaultDiffEngine(java.util.List<java.lang.String> leftV, java.util.List<java.lang.String> rightV)
public void setNotExistingLinesAsSpace(boolean notExistingLinesAsSpace)
notExistingLinesAsSpace
- true if not existing lines should be represented as a null Stringpublic boolean notExistingLinesAsSpace()
public java.util.List<java.lang.String> getLeftText()
getLeftText
in interface DiffEngine
public java.util.List<java.lang.String> getRightText()
getRightText
in interface DiffEngine
public void setDiffAlgorithm(short diffAlgorithm)
setDiffAlgorithm
in interface DiffEngine
diffAlgorithm
- the diff algorithmpublic short getDiffAlgorithm()
getDiffAlgorithm
in interface DiffEngine
public java.util.List<DiffEngine.DiffLine> getRightDiffLines()
public java.util.List<DiffEngine.DiffLine> getLeftDiffLines()
public void populate(DiffBase diffbase)
populate
in interface DiffEngine
diffbase
- the DiffBaseCopyright © 2016, 2017, 2018, 2019, 2023 Herve Girod. All Rights Reserved. Documentation and source under the MIT licence