| java.lang.Object org.netbeans.api.diff.Difference
Difference | public class Difference extends Object implements Serializable(Code) | | This class represents a single difference between two files.
author: Martin Entlicher |
Field Summary | |
final public static int | ADD | final public static int | CHANGE | final public static int | DELETE |
Constructor Summary | |
public | Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd) Creates a new instance of Difference
Parameters: type - The type of the difference. | public | Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd, String firstText, String secondText) Creates a new instance of Difference
Parameters: type - The type of the difference. | public | Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd, String firstText, String secondText, Difference.Part[] firstLineDiffs, Difference.Part[] secondLineDiffs) Creates a new instance of Difference
Parameters: type - The type of the difference. |
Method Summary | |
public int | getFirstEnd() Get the line number on which the difference ends in the first file. | public Difference.Part[] | getFirstLineDiffs() The list of differences on lines in the first file. | public int | getFirstStart() Get the line number on which the difference starts in the first file.
For ADD changes it returns previous line number e.g. | public String | getFirstText() Get the text content of the difference in the first file. | public int | getSecondEnd() Get the line number on which the difference ends in the second file. | public Difference.Part[] | getSecondLineDiffs() The list of differences on lines in the second file. | public int | getSecondStart() Get the line number on which the difference starts in the second file. | public String | getSecondText() Get the text content of the difference in the second file. | public int | getType() Get the difference type. | public String | toString() |
ADD | final public static int ADD(Code) | | Add type of difference - a portion of a file was added in the other
|
CHANGE | final public static int CHANGE(Code) | | Change type of difference - a portion of a file was changed in the other
|
DELETE | final public static int DELETE(Code) | | Delete type of difference - a portion of a file was removed in the other
|
Difference | public Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd)(Code) | | Creates a new instance of Difference
Parameters: type - The type of the difference. Must be one of the DELETE,ADD or CHANGE Parameters: firstStart - The line number on which the difference starts in the first file. Parameters: firstEnd - The line number on which the difference ends in the first file. Parameters: secondStart - The line number on which the difference starts in the second file. Parameters: secondEnd - The line number on which the difference ends in the second file. |
Difference | public Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd, String firstText, String secondText)(Code) | | Creates a new instance of Difference
Parameters: type - The type of the difference. Must be one of the DELETE,ADD or CHANGE Parameters: firstStart - The line number on which the difference starts in the first file. Parameters: firstEnd - The line number on which the difference ends in the first file. Parameters: secondStart - The line number on which the difference starts in the second file. Parameters: secondEnd - The line number on which the difference ends in the second file. Parameters: firstText - The text content of the difference in the first file. Parameters: secondText - The text content of the difference in the second file. |
Difference | public Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd, String firstText, String secondText, Difference.Part[] firstLineDiffs, Difference.Part[] secondLineDiffs)(Code) | | Creates a new instance of Difference
Parameters: type - The type of the difference. Must be one of the DELETE,ADD or CHANGE Parameters: firstStart - The line number on which the difference starts in the first file. Parameters: firstEnd - The line number on which the difference ends in the first file. Parameters: secondStart - The line number on which the difference starts in the second file. Parameters: secondEnd - The line number on which the difference ends in the second file. Parameters: firstText - The text content of the difference in the first file. Parameters: secondText - The text content of the difference in the second file. Parameters: firstLineDiffs - The list of differences on lines in the first file.The list contains instances of Difference.Part.Can be null when there are no line differences. Parameters: secondLineDiffs - The list of differences on lines in the second file.The list contains instances of Difference.Part.Can be null when there are no line differences. |
getFirstEnd | public int getFirstEnd()(Code) | | Get the line number on which the difference ends in the first file.
Does not have any meaning for ADD changes.
|
getFirstLineDiffs | public Difference.Part[] getFirstLineDiffs()(Code) | | The list of differences on lines in the first file.
The list contains instances of
Difference.Part .
Can be null when there are no line differences.
|
getFirstStart | public int getFirstStart()(Code) | | Get the line number on which the difference starts in the first file.
For ADD changes it returns previous line number e.g. 0 for add
file start.
|
getFirstText | public String getFirstText()(Code) | | Get the text content of the difference in the first file.
|
getSecondEnd | public int getSecondEnd()(Code) | | Get the line number on which the difference ends in the second file.
Does not have any meaning for DELETE changes.
|
getSecondLineDiffs | public Difference.Part[] getSecondLineDiffs()(Code) | | The list of differences on lines in the second file.
The list contains instances of
Difference.Part .
Can be null when there are no line differences.
|
getSecondStart | public int getSecondStart()(Code) | | Get the line number on which the difference starts in the second file.
|
getSecondText | public String getSecondText()(Code) | | Get the text content of the difference in the second file.
|
getType | public int getType()(Code) | | Get the difference type. It's one of DELETE,
ADD or CHANGE meaning
respective change in second source.
|
|
|