JLibDiff
Class Hunk

java.lang.Object
  |
  +--JLibDiff.Hunk
All Implemented Interfaces:
HunkVisitable
Direct Known Subclasses:
HunkAdd, HunkChange, HunkDel

public abstract class Hunk
extends java.lang.Object
implements HunkVisitable

The Hunk class is a super class of classes HunkAdd , HunkChange and HunkDel .it is an abstarct class.


Field Summary
(package private)  Hunk next
           
 
Constructor Summary
Hunk()
           
 
Method Summary
abstract  void accept(HunkVisitor visitor)
           
abstract  java.lang.String convert_ED()
          Returns a string representation of the current hunk with ED_script format .
abstract  java.lang.String convert_RCS()
          Returns a string representation of the current hunk with RCS_script format .
abstract  java.lang.String convert()
          Returns a string representation of the current hunk with normal format .
abstract  int highLine(int filenum)
          Returns the number of high line of file passed in argument .
abstract  int lowLine(int filenum)
          Returns the number of low line of file passed in argument .
abstract  int numLines(int filenum)
          Returns the number of lines consedered in this hunk and which came from file passed in argument .
abstract  java.lang.String relNum(int filenum, int linenum)
          Returns a string representing the line in file and position passed in argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

Hunk next
Constructor Detail

Hunk

public Hunk()
Method Detail

accept

public abstract void accept(HunkVisitor visitor)
Specified by:
accept in interface HunkVisitable

convert

public abstract java.lang.String convert()
Returns a string representation of the current hunk with normal format .


convert_ED

public abstract java.lang.String convert_ED()
Returns a string representation of the current hunk with ED_script format .


convert_RCS

public abstract java.lang.String convert_RCS()
Returns a string representation of the current hunk with RCS_script format .


lowLine

public abstract int lowLine(int filenum)
Returns the number of low line of file passed in argument . Lines are inclusif.

Parameters:
filenum - The number of file (the first file '0', or the second '1').

highLine

public abstract int highLine(int filenum)
Returns the number of high line of file passed in argument . Lines are inclusif.

Parameters:
filenum - The number of file (the first file '0', or the second '1').

numLines

public abstract int numLines(int filenum)
Returns the number of lines consedered in this hunk and which came from file passed in argument .

Parameters:
filenum - The number of file (the first file '0', or the second '1').

relNum

public abstract java.lang.String relNum(int filenum,
                                        int linenum)
Returns a string representing the line in file and position passed in argument.

Parameters:
filenum - The number of file (the first file '0', or the second '1').
linenum - the number of line that will be returned.


Copyright © 2003 Soucejammer project.