KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > speedo > pobjects > userid > UserId2


1 /**
2  * Copyright (C) 2001-2004 France Telecom R&D
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * 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 package org.objectweb.speedo.pobjects.userid;
19
20 /**
21  *
22  * @author S.Chassande-Barrioz
23  */

24 public class UserId2 {
25     public String JavaDoc id1;
26     public long id2;
27
28     public String JavaDoc f1 = null;
29     public int f2 = 0;
30
31
32     private UserId2(String JavaDoc f1, int f2) {
33         this.f1 = f1;
34         this.f2 = f2;
35     }
36     protected UserId2(String JavaDoc f1) {
37         this.f1 = f1;
38     }
39     public UserId2() {
40     }
41
42     public String JavaDoc readF1() {
43         return f1;
44     }
45
46     public void writeF1(String JavaDoc f1) {
47         this.f1 = f1;
48     }
49
50     public int readF2() {
51         return f2;
52     }
53
54     public void writeF2(int f2) {
55         this.f2 = f2;
56     }
57
58     public String JavaDoc readF1_F2() {
59         return f1 + f2;
60     }
61
62     public void writeF1() {
63         f1 = "azerty";
64     }
65
66     public void writeF2() {
67         f2 = 1;
68     }
69
70     public void writeF1_F2() {
71         f1 = "qsdfgh";
72         f2 = 2;
73     }
74
75     public void delegateWriteF1() {
76         writeF1();
77     }
78
79 }
80
Popular Tags