DiffUtilpublic class DiffUtil
extends java.lang.Object
DiffTest to see the expected inputs and outputs.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLOSE_DEL
Deprecated.
|
static java.lang.String |
CLOSE_INS
Deprecated.
|
static java.lang.String |
CONTEXT_LINE
Deprecated.
|
static java.lang.String |
OPEN_DEL
Deprecated.
|
static java.lang.String |
OPEN_INS
Deprecated.
|
| Constructor and Description |
|---|
DiffUtil()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<DiffResult>[] |
diff(java.io.Reader source,
java.io.Reader target)
Deprecated.
This is a diff method with default values.
|
static java.util.List<DiffResult>[] |
diff(java.io.Reader source,
java.io.Reader target,
java.lang.String addedMarkerStart,
java.lang.String addedMarkerEnd,
java.lang.String deletedMarkerStart,
java.lang.String deletedMarkerEnd,
int margin)
Deprecated.
The main entrance of this class.
|
public static final java.lang.String CLOSE_DEL
public static final java.lang.String CLOSE_INS
public static final java.lang.String CONTEXT_LINE
public static final java.lang.String OPEN_DEL
public static final java.lang.String OPEN_INS
public static java.util.List<DiffResult>[] diff(java.io.Reader source, java.io.Reader target)
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 static java.util.List<DiffResult>[] diff(java.io.Reader source, java.io.Reader target, java.lang.String addedMarkerStart, java.lang.String addedMarkerEnd, java.lang.String deletedMarkerStart, java.lang.String deletedMarkerEnd, int margin)
DiffResults.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