public abstract class DifferBase<T> extends java.lang.Object
DiffDescription
for two
elements.Constructor and Description |
---|
DifferBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract java.util.List<TextChunk> |
getChunks(T element,
boolean isLeft)
Returns the chunks for an element.
|
protected abstract java.lang.String |
getDiffName()
Returns the name for this diff.
|
protected abstract java.lang.String |
getElementText(T element)
Get the text of the element.
|
DiffDescription |
performDiff(T leftElement,
T rightElement)
Performs the diff and returns a
DiffDescription . |
protected DiffDescription |
postProcessDiffDescription(DiffDescription diffDescription)
Post processing of the diffDescription.
|
public DifferBase()
public DiffDescription performDiff(T leftElement, T rightElement)
DiffDescription
.protected DiffDescription postProcessDiffDescription(DiffDescription diffDescription)
protected abstract java.lang.String getElementText(T element)
protected abstract java.util.List<TextChunk> getChunks(T element, boolean isLeft)
isLeft
- indicates whether this method is called for the left or right
element. The implementer then may behave differently for both
elements (possibly depending on additional information).protected abstract java.lang.String getDiffName()