KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.xml.driver.diff;
2
3 class edit{
4
5   int op;
6   int line1;
7   int line2;
8   edit next;
9
10   public void setop(int p){
11        op=p;
12   }
13   public void setline1(int i){
14     line1=i;
15   }
16   public void setline2 (int j){
17     line2=j;
18   }
19   public void setnext (edit n){
20     next=n;
21   }
22
23   public void setedit(int i,int j,int k){
24    op=i;
25    line1=j;
26    line2=k;
27    next=null;
28   }
29
30  public int getop(){
31   return op;
32  }
33  public int getline1(){
34   return line1;
35  }
36  public int getline2(){
37   return line2;
38  }
39
40   public static void add(edit e,edit m){
41    m.next=e;
42    e=m;
43   }
44
45  public void affiche(){
46    System.out.println("-----------------------");
47    System.out.println(Integer.toString(op));
48    System.out.println(Integer.toString(line1));
49    System.out.println(Integer.toString(line2));
50    System.out.println("-----------------------");
51    if(next!=null)
52      next.affiche();
53   }
54
55 }
56
Popular Tags