01: /*
02: * Copyright (C) 2001, 2002 Robert MacGrogan
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: *
18: *
19: * $Archive: SourceJammer$
20: * $FileName: edit.java$
21: * $FileID: 4285$
22: *
23: * Last change:
24: * $AuthorName: Rob MacGrogan$
25: * $Date: 4/23/03 5:23 PM$
26: * $Comment: Replaced GPL header with LGPL header.$
27: *
28: * $KeyWordsOff: $
29: */
30:
31: package JLibDiff;
32:
33: class edit {
34:
35: int op;
36: int line1;
37: int line2;
38: edit next;
39:
40: public void setop(int p) {
41: op = p;
42: }
43:
44: public void setline1(int i) {
45: line1 = i;
46: }
47:
48: public void setline2(int j) {
49: line2 = j;
50: }
51:
52: public void setnext(edit n) {
53: next = n;
54: }
55:
56: public void setedit(int i, int j, int k) {
57: op = i;
58: line1 = j;
59: line2 = k;
60: next = null;
61: }
62:
63: public int getop() {
64: return op;
65: }
66:
67: public int getline1() {
68: return line1;
69: }
70:
71: public int getline2() {
72: return line2;
73: }
74:
75: public static void add(edit e, edit m) {
76: m.next = e;
77: e = m;
78: }
79:
80: public void affiche() {
81: System.out.println("-----------------------");
82: System.out.println(Integer.toString(op));
83: System.out.println(Integer.toString(line1));
84: System.out.println(Integer.toString(line2));
85: System.out.println("-----------------------");
86: if (next != null)
87: next.affiche();
88: }
89:
90: }
|