Package com.jalios.util.diff
Class HunkChange
- java.lang.Object
-
- com.jalios.util.diff.Hunk
-
- com.jalios.util.diff.HunkChange
-
public class HunkChange extends Hunk
TheHunkChange
class represents a bloc of difference reliding change.
-
-
Constructor Summary
Constructors Constructor Description HunkChange()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
convert()
Returns a string representation of the current hunk with normal format .java.lang.String
convert_ED()
Returns a string representation of the current hunk with ED_script format .java.lang.String
convert_RCS()
Returns a string representation of the current hunk with RCS_script format .java.lang.String
getAfter()
java.lang.String
getBefore()
java.lang.String
getNewContents()
Returns update string.int
highLine(int filenum)
Returns the number of high line of file passed in argument .int
lowLine(int filenum)
Returns the number of low line of file passed in argument .int
numLines(int filenum)
Returns the number of lines consedered in this hunk and which came from file passed in argument .java.lang.String
relNum(int filenum, int linenum)
Returns a string representing the line in file and position passed in argument.
-
-
-
Method Detail
-
getNewContents
public java.lang.String getNewContents()
Returns update string.
-
convert
public java.lang.String convert()
Returns a string representation of the current hunk with normal format .
-
convert_ED
public java.lang.String convert_ED()
Returns a string representation of the current hunk with ED_script format .- Specified by:
convert_ED
in classHunk
-
convert_RCS
public java.lang.String convert_RCS()
Returns a string representation of the current hunk with RCS_script format .- Specified by:
convert_RCS
in classHunk
-
lowLine
public int lowLine(int filenum)
Returns the number of low line of file passed in argument . Lines are inclusif.
-
highLine
public int highLine(int filenum)
Returns the number of high line of file passed in argument . Lines are inclusif.
-
numLines
public int numLines(int filenum)
Returns the number of lines consedered in this hunk and which came from file passed in argument .
-
relNum
public java.lang.String relNum(int filenum, int linenum)
Returns a string representing the line in file and position passed in argument.
-
getAfter
public java.lang.String getAfter()
- Specified by:
getAfter
in classHunk
- See Also:
Hunk.getAfter()
-
getBefore
public java.lang.String getBefore()
- Specified by:
getBefore
in classHunk
- See Also:
Hunk.getBefore()
-
-