public class DiffImpl
extends Object
implements com.liferay.portal.kernel.diff.Diff
DiffTest
to see the expected inputs and outputs.Constructor and Description |
---|
DiffImpl() |
Modifier and Type | Method and Description |
---|---|
List<com.liferay.portal.kernel.diff.DiffResult>[] |
diff(Reader source,
Reader target)
This is a diff method with default values.
|
List<com.liferay.portal.kernel.diff.DiffResult>[] |
diff(Reader source,
Reader target,
String addedMarkerStart,
String addedMarkerEnd,
String deletedMarkerStart,
String deletedMarkerEnd,
int margin)
The main entrance of this class.
|
public List<com.liferay.portal.kernel.diff.DiffResult>[] diff(Reader source, Reader target)
diff
in interface com.liferay.portal.kernel.diff.Diff
source
- the source texttarget
- the modified version of the source textDiffResults
, the
first element contains DiffResults related to changes in source
and the second element to changes in targetpublic List<com.liferay.portal.kernel.diff.DiffResult>[] diff(Reader source, Reader target, String addedMarkerStart, String addedMarkerEnd, String deletedMarkerStart, String deletedMarkerEnd, int margin)
DiffResults
.diff
in interface com.liferay.portal.kernel.diff.Diff
source
- the source texttarget
- the modified version of the source textaddedMarkerStart
- the marker to indicate the start of text added
to the sourceaddedMarkerEnd
- the marker to indicate the end of text added to
the sourcedeletedMarkerStart
- the marker to indicate the start of text
deleted from the sourcedeletedMarkerEnd
- the marker to indicate the end of text deleted
from the sourcemargin
- the vertical margin to use in displaying differences
between changed line changesDiffResults
, the
first element contains DiffResults related to changes in source
and the second element to changes in target