KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > speedo > pobjects > map > AllMap


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.map;
19
20 import java.util.Map JavaDoc;
21 import java.util.HashMap JavaDoc;
22 import java.util.Hashtable JavaDoc;
23 import java.util.Properties JavaDoc;
24
25 /**
26  *
27  * @author S.Chassande-Barrioz
28  */

29 public class AllMap {
30
31     private String JavaDoc id;
32     private Map JavaDoc map_str2Long;
33     private Map JavaDoc map_str2Ref;
34     private Map JavaDoc map_Long2Long;
35     private Map JavaDoc map_Long2Ref;
36
37     private HashMap JavaDoc hmap_str2Long;
38     private HashMap JavaDoc hmap_str2Ref;
39     private HashMap JavaDoc hmap_Long2Long;
40     private HashMap JavaDoc hmap_Long2Ref;
41
42     private Hashtable JavaDoc ht_str2Long;
43     private Hashtable JavaDoc ht_str2Ref;
44     private Hashtable JavaDoc ht_Long2Long;
45     private Hashtable JavaDoc ht_Long2Ref;
46
47     private Properties JavaDoc prop;
48
49
50     public AllMap() {
51     }
52
53     public AllMap(String JavaDoc id) {
54         this.id = id;
55     }
56
57     public void setStr2Long(Map JavaDoc m) {
58         if (m == null) {
59             map_str2Long = null;
60             hmap_str2Long = null;
61             ht_str2Long = null;
62         } else {
63             map_str2Long = new HashMap JavaDoc(m);
64             hmap_str2Long = new HashMap JavaDoc(m);
65             ht_str2Long = new Hashtable JavaDoc(m);
66         }
67     }
68     public void setStr2Ref(Map JavaDoc m) {
69         if (m == null) {
70             map_str2Ref = null;
71             hmap_str2Ref = null;
72             ht_str2Ref = null;
73         } else {
74             map_str2Ref = new HashMap JavaDoc(m);
75             hmap_str2Ref = new HashMap JavaDoc(m);
76             ht_str2Ref = new Hashtable JavaDoc(m);
77         }
78     }
79     public void setLong2Long(Map JavaDoc m) {
80         if (m == null) {
81             map_Long2Long = null;
82             hmap_Long2Long = null;
83             ht_Long2Long = null;
84         } else {
85             map_Long2Long = new HashMap JavaDoc(m);
86             hmap_Long2Long = new HashMap JavaDoc(m);
87             ht_Long2Long = new Hashtable JavaDoc(m);
88         }
89     }
90
91     public void setlong2Ref(Map JavaDoc m) {
92         if (m == null) {
93             map_Long2Ref = null;
94             hmap_Long2Ref = null;
95             ht_Long2Ref = null;
96         } else {
97             map_Long2Ref = new HashMap JavaDoc(m);
98             hmap_Long2Ref = new HashMap JavaDoc(m);
99             ht_Long2Ref = new Hashtable JavaDoc(m);
100         }
101     }
102
103     public void setProp(Map JavaDoc m) {
104         if (m == null) {
105             prop = null;
106         } else {
107             prop = new Properties JavaDoc();
108             prop.putAll(m);
109         }
110     }
111
112     public String JavaDoc getId() {
113         return id;
114     }
115
116     public Map JavaDoc getMap_str2Long() {
117         return map_str2Long;
118     }
119
120     public Map JavaDoc getMap_str2Ref() {
121         return map_str2Ref;
122     }
123
124     public Map JavaDoc getMap_Long2Long() {
125         return map_Long2Long;
126     }
127
128     public Map JavaDoc getMap_Long2Ref() {
129         return map_Long2Ref;
130     }
131
132     public HashMap JavaDoc getHmap_str2Long() {
133         return hmap_str2Long;
134     }
135
136     public HashMap JavaDoc getHmap_str2Ref() {
137         return hmap_str2Ref;
138     }
139
140     public HashMap JavaDoc getHmap_Long2Long() {
141         return hmap_Long2Long;
142     }
143
144     public HashMap JavaDoc getHmap_Long2Ref() {
145         return hmap_Long2Ref;
146     }
147
148     public Hashtable JavaDoc getHt_str2Long() {
149         return ht_str2Long;
150     }
151
152     public Hashtable JavaDoc getHt_str2Ref() {
153         return ht_str2Ref;
154     }
155
156     public Hashtable JavaDoc getHt_Long2Long() {
157         return ht_Long2Long;
158     }
159
160     public Hashtable JavaDoc getHt_Long2Ref() {
161         return ht_Long2Ref;
162     }
163
164     public Properties JavaDoc getProp() {
165         return prop;
166     }
167 }
168
Popular Tags