|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.util.diff.DiffUtil
DiffUtil
public class DiffUtil
This class can compare two different versions of a text. Source refers to the
earliest version of the text and target refers to a modified version of
source. Changes are considered either as a removal from the source or as an
addition to the target. This class detects changes to an entire line and also
detects changes within lines, such as, removal or addition of characters.
Take a look at DiffTest
to see the expected inputs and outputs.
Field Summary | |
---|---|
static String |
CLOSE_DEL
Deprecated. |
static String |
CLOSE_INS
Deprecated. |
static String |
CONTEXT_LINE
Deprecated. |
static String |
OPEN_DEL
Deprecated. |
static String |
OPEN_INS
Deprecated. |
Constructor Summary | |
---|---|
DiffUtil()
Deprecated. |
Method Summary | |
---|---|
static List<DiffResult>[] |
diff(Reader source,
Reader target)
Deprecated. This is a diff method with default values. |
static List<DiffResult>[] |
diff(Reader source,
Reader target,
String addedMarkerStart,
String addedMarkerEnd,
String deletedMarkerStart,
String deletedMarkerEnd,
int margin)
Deprecated. The main entrance of this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CLOSE_DEL
public static final String CLOSE_INS
public static final String CONTEXT_LINE
public static final String OPEN_DEL
public static final String OPEN_INS
Constructor Detail |
---|
public DiffUtil()
Method Detail |
---|
public static List<DiffResult>[] diff(Reader source, Reader target)
DiffResults
, the
first element contains DiffResults related to changes in source
and the second element to changes in targetpublic static List<DiffResult>[] diff(Reader source, Reader target, String addedMarkerStart, String addedMarkerEnd, String deletedMarkerStart, String deletedMarkerEnd, int margin)
DiffResults
.
DiffResults
, the
first element contains DiffResults related to changes in source
and the second element to changes in target
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |