01: /**
02: * Copyright (C) 2001-2004 France Telecom R&D
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 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: */package org.objectweb.speedo.pobjects.userid;
18:
19: /**
20: *
21: * @author M. Guillemin
22: */
23: public class LinkedIntUserId {
24: private int name;
25: private String f1;
26: private LinkedIntUserId next;
27:
28: public LinkedIntUserId() {
29: }
30:
31: public LinkedIntUserId(int name, String f1, LinkedIntUserId next) {
32: this .name = name;
33: this .f1 = f1;
34: this .next = next;
35: }
36:
37: public int getName() {
38: return name;
39: }
40:
41: public void setName(int name) {
42: this .name = name;
43: }
44:
45: public String getF1() {
46: return f1;
47: }
48:
49: public void setF1(String f1) {
50: this .f1 = f1;
51: }
52:
53: public LinkedIntUserId getNext() {
54: return next;
55: }
56:
57: public void setNext(LinkedIntUserId next) {
58: this .next = next;
59: }
60:
61: public int readName(int nbRead) {
62: int res = 0;
63: for (int i = 0; i < nbRead; i++) {
64: res += this .name;
65: }
66: return res;
67: }
68:
69: public void writeName(int nbWrite, int value) {
70: for (int i = 0; i < nbWrite; i++) {
71: this .name += value;
72: }
73: }
74:
75: public void writeF1(int nbWrite, String value) {
76: for (int i = 0; i < nbWrite; i++) {
77: this.f1 = value;
78: }
79:
80: }
81:
82: }
|