KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > xml > driver > diff > Hunk


1 package org.enhydra.xml.driver.diff;
2
3  /**
4    * The <code>Hunk</code> class is a super class of classes <code>HunkAdd ,
5    * HunkChange</code> and <code>HunkDel</code> .it is an abstarct class.
6    */

7 public abstract class Hunk implements HunkVisitable {
8     
9     Hunk next=null;
10     
11   public abstract void accept(HunkVisitor visitor);
12     
13   /**
14    * Returns a string representation of the current hunk
15    * with normal format .
16    */

17   public abstract String JavaDoc convert();
18
19   /**
20    * Returns a string representation of the current hunk
21    * with ED_script format .
22    */

23   public abstract String JavaDoc convert_ED();
24
25   /**
26     * Returns a string representation of the current hunk
27     * with RCS_script format .
28     */

29   public abstract String JavaDoc convert_RCS();
30
31   /**
32    * Returns the number of low line of file passed in argument .
33    * Lines are inclusif.
34    *
35    * @param filenum The number of file (the first file '0', or the second '1').
36    */

37   public abstract int lowLine(int filenum);
38
39   /**
40    * Returns the number of high line of file passed in argument .
41    * Lines are inclusif.
42    *
43    * @param filenum The number of file (the first file '0', or the second '1').
44    */

45   public abstract int highLine(int filenum);
46
47   /**
48    * Returns the number of lines consedered in this hunk and which
49    * came from file passed in argument .
50    *
51    * @param filenum The number of file (the first file '0', or the second '1').
52    */

53   public abstract int numLines(int filenum);
54
55   /**
56    * Returns a string representing the line in file and position
57    * passed in argument.
58    *
59    * @param filenum The number of file (the first file '0', or the second '1').
60    * @param linenum the number of line that will be returned.
61    */

62   public abstract String JavaDoc relNum(int filenum,int linenum);
63
64
65 }
66
Popular Tags