public class UnifiedDiff extends Object
| Constructor and Description |
|---|
UnifiedDiff(String diffString)
Create a new
UnifiedDiff with the given diff. |
UnifiedDiff(String diffString,
boolean newFile,
String filename)
Creates a new
UnifiedDiff with the given diff. |
| Modifier and Type | Method and Description |
|---|---|
String |
asHtmlSnippet()
Converts this diff into a side-by-side html format.
|
List<Hunk> |
getHunks()
Gets the hunks.
|
String |
getNewName()
Gets the new name.
|
String |
getOriginalName()
Gets the original name.
|
String |
toString() |
public UnifiedDiff(String diffString)
UnifiedDiff with the given diff.diffString - the diff datapublic UnifiedDiff(String diffString, boolean newFile, String filename)
UnifiedDiff with the given diff.
If the flag newFile is true, then not a diff is assumed,
simply the content of the new file is expected.diffString - the diff data or file contentnewFile - if false, a real diff is expected.filename - the file name. Only needed if not a real diff is provided.public String asHtmlSnippet()
public String getOriginalName()
public String getNewName()
Copyright © 2013-2015. All Rights Reserved.