Package net.morimekta.diff
Class Diff
- java.lang.Object
-
- net.morimekta.diff.DiffBase
-
- net.morimekta.diff.Diff
-
public class Diff extends DiffBase
Diff.
-
-
Constructor Summary
Constructors Constructor Description Diff(java.lang.String text1, java.lang.String text2)
Diff(java.lang.String text1, java.lang.String text2, DiffOptions options)
Diff(java.lang.String text1, java.lang.String text2, DiffOptions options, long deadline)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Diff
fromDelta(java.lang.String text1, java.lang.String delta)
Given the original text1, and an encoded string which describes the operations required to transform text1 into text2, compute the full diff.java.util.LinkedList<Change>
getChangeList()
Get the finished changelist.-
Methods inherited from class net.morimekta.diff.DiffBase
equals, getOptions, hashCode, levenshtein, prettyHtml, text1, text2, toDelta, toString, xIndex
-
-
-
-
Constructor Detail
-
Diff
public Diff(java.lang.String text1, java.lang.String text2)
-
Diff
public Diff(java.lang.String text1, java.lang.String text2, DiffOptions options)
-
Diff
public Diff(java.lang.String text1, java.lang.String text2, DiffOptions options, long deadline)
-
-
Method Detail
-
getChangeList
public java.util.LinkedList<Change> getChangeList()
Description copied from class:DiffBase
Get the finished changelist.- Specified by:
getChangeList
in classDiffBase
- Returns:
- List of changes.
-
fromDelta
public static Diff fromDelta(java.lang.String text1, java.lang.String delta) throws java.lang.IllegalArgumentException
Given the original text1, and an encoded string which describes the operations required to transform text1 into text2, compute the full diff.- Parameters:
text1
- Source string for the diff.delta
- Delta text.- Returns:
- Diff object.
- Throws:
java.lang.IllegalArgumentException
- If invalid input.
-
-