KickJava   Java API By Example, From Geeks To Geeks.

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


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 M. Guillemin
23  */

24 public class LinkedIntUserId {
25     private int name;
26     private String JavaDoc f1;
27     private LinkedIntUserId next;
28
29     public LinkedIntUserId() {
30     }
31
32     public LinkedIntUserId(int name, String JavaDoc f1, LinkedIntUserId next) {
33         this.name = name;
34         this.f1 = f1;
35         this.next = next;
36     }
37
38     public int getName() {
39         return name;
40     }
41
42     public void setName(int name) {
43         this.name = name;
44     }
45
46     public String JavaDoc getF1() {
47         return f1;
48     }
49
50     public void setF1(String JavaDoc f1) {
51         this.f1 = f1;
52     }
53     
54     public LinkedIntUserId getNext() {
55         return next;
56     }
57     
58     public void setNext(LinkedIntUserId next) {
59         this.next = next;
60     }
61     
62     public int readName(int nbRead) {
63         int res=0;
64         for (int i=0; i< nbRead; i++) {
65             res += this.name;
66         }
67         return res;
68     }
69     
70     public void writeName(int nbWrite, int value) {
71         for (int i=0; i< nbWrite; i++) {
72             this.name += value;
73         }
74     }
75
76     public void writeF1(int nbWrite, String JavaDoc value) {
77         for (int i=0; i< nbWrite; i++) {
78             this.f1 = value;
79         }
80         
81     }
82     
83 }
84
Popular Tags