|
org.netbeans.modules.diff/1 1.15.31 42 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.api.diff.Difference
public class Difference
This class represents a single difference between two files.
Nested Class Summary | |
---|---|
static class |
Difference.Part
This class represents a difference on a single line. |
Field Summary | |
---|---|
static int |
ADD
Add type of difference - a portion of a file was added in the other |
static int |
CHANGE
Change type of difference - a portion of a file was changed in the other |
static int |
DELETE
Delete type of difference - a portion of a file was removed in the other |
Constructor Summary | |
---|---|
Difference(int type,
int firstStart,
int firstEnd,
int secondStart,
int secondEnd)
Creates a new instance of Difference |
|
Difference(int type,
int firstStart,
int firstEnd,
int secondStart,
int secondEnd,
String firstText,
String secondText)
Creates a new instance of Difference |
|
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 |
Method Summary | |
---|---|
int |
getFirstEnd()
Get the line number on which the difference ends in the first file. |
Difference.Part[] |
getFirstLineDiffs()
The list of differences on lines in the first file. |
int |
getFirstStart()
Get the line number on which the difference starts in the first file. |
String |
getFirstText()
Get the text content of the difference in the first file. |
int |
getSecondEnd()
Get the line number on which the difference ends in the second file. |
Difference.Part[] |
getSecondLineDiffs()
The list of differences on lines in the second file. |
int |
getSecondStart()
Get the line number on which the difference starts in the second file. |
String |
getSecondText()
Get the text content of the difference in the second file. |
int |
getType()
Get the difference type. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DELETE
public static final int ADD
public static final int CHANGE
Constructor Detail |
---|
public Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd)
type
- The type of the difference. Must be one of the DELETE,
ADD or CHANGEfirstStart
- The line number on which the difference starts in the first file.firstEnd
- The line number on which the difference ends in the first file.secondStart
- The line number on which the difference starts in the second file.secondEnd
- The line number on which the difference ends in the second file.public Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd, String firstText, String secondText)
type
- The type of the difference. Must be one of the DELETE,
ADD or CHANGEfirstStart
- The line number on which the difference starts in the first file.firstEnd
- The line number on which the difference ends in the first file.secondStart
- The line number on which the difference starts in the second file.secondEnd
- The line number on which the difference ends in the second file.firstText
- The text content of the difference in the first file.secondText
- The text content of the difference in the second file.public Difference(int type, int firstStart, int firstEnd, int secondStart, int secondEnd, String firstText, String secondText, Difference.Part[] firstLineDiffs, Difference.Part[] secondLineDiffs)
type
- The type of the difference. Must be one of the DELETE,
ADD or CHANGEfirstStart
- The line number on which the difference starts in the first file.firstEnd
- The line number on which the difference ends in the first file.secondStart
- The line number on which the difference starts in the second file.secondEnd
- The line number on which the difference ends in the second file.firstText
- The text content of the difference in the first file.secondText
- The text content of the difference in the second file.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.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.Method Detail |
---|
public int getType()
public int getFirstStart()
For ADD changes it returns previous line number e.g. 0 for add file start.
public int getFirstEnd()
Does not have any meaning for ADD changes.
public int getSecondStart()
public int getSecondEnd()
Does not have any meaning for DELETE changes.
public Difference.Part[] getFirstLineDiffs()
Difference.Part
.
Can be null
when there are no line differences.
public Difference.Part[] getSecondLineDiffs()
Difference.Part
.
Can be null
when there are no line differences.
public String getFirstText()
public String getSecondText()
public String toString()
|
org.netbeans.modules.diff/1 1.15.31 42 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |