Package io.keikai.doc.collab.lib0
Class Diff
java.lang.Object
io.keikai.doc.collab.lib0.Diff
Efficient diffs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanequalityStrict(Object a, Object b) static <T> SimpleDiff<T[]>simpleDiffArray(T[] a, T[] b) Create a diff between two arrays.static <T> SimpleDiff<T[]>simpleDiffArray(T[] a, T[] b, BiPredicate<T, T> compare) Create a diff between two arrays.static SimpleDiff<String>simpleDiffString(String a, String b) Create a diff between two strings.static SimpleDiff<String>simpleDiffStringWithCursor(String a, String b, int cursor) Diff text and try to diff at the current cursor position.
-
Method Details
-
simpleDiffString
Create a diff between two strings. This diff implementation is highly efficient, but not very sophisticated.- Parameters:
a-b-- Returns:
-
simpleDiffArray
Create a diff between two arrays. This diff implementation is highly efficient, but not very sophisticated.- Parameters:
a-b-- Returns:
-
simpleDiffArray
Create a diff between two arrays. This diff implementation is highly efficient, but not very sophisticated.- Type Parameters:
T-- Parameters:
a-b-compare-- Returns:
-
simpleDiffStringWithCursor
Diff text and try to diff at the current cursor position.- Parameters:
a-b-cursor-- Returns:
-
equalityStrict
-