public class DiffHelper extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
DiffHelper.Diff |
Class representing one diff operation.
|
static class |
DiffHelper.Operation |
The data structure representing a diff is a Linked list of Diff objects:
{Diff(Operation.DELETE, "Hello"), Diff(Operation.INSERT, "Goodbye"),
Diff(Operation.EQUAL, " world.")}
which means: delete "Hello", add "Goodbye" and keep " world."
|
| Constructor | Description |
|---|---|
DiffHelper() |
| Modifier and Type | Method | Description |
|---|---|---|
static List<DiffHelper.Diff> |
diff(AttributedString text1,
AttributedString text2) |
Compute a list of difference between two lines.
|
public static List<DiffHelper.Diff> diff(AttributedString text1, AttributedString text2)
text1 - the old linetext2 - the new lineCopyright © 2020. All rights reserved.