KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejtools > jmx > browser > frame > ResourceIndexer


1 /*
2
3  * EJTools, the Enterprise Java Tools
4
5  *
6
7  * Distributable under LGPL license.
8
9  * See terms of license at www.gnu.org.
10
11  */

12
13 package org.ejtools.jmx.browser.frame;
14
15
16
17 import org.ejtools.adwt.util.DefaultObjectIndexer;
18
19 import org.ejtools.jmx.browser.model.Resource;
20
21
22
23 /**
24
25  * @author letiemble
26
27  * @created 21 janvier 2003
28
29  * @version $Revision: 1.1 $
30
31  */

32
33 public class ResourceIndexer extends DefaultObjectIndexer
34
35 {
36
37    /**
38
39     * Description of the Method
40
41     *
42
43     * @param key Description of the Parameter
44
45     * @param value Description of the Parameter
46
47     * @return Description of the Return Value
48
49     */

50
51    public Object JavaDoc put(Object JavaDoc key, Object JavaDoc value)
52
53    {
54
55       if (key instanceof Resource)
56
57       {
58
59          return super.put(((Resource) key).getCanonicalName(), value);
60
61       }
62
63       return super.put(key, value);
64
65    }
66
67
68
69
70
71    /**
72
73     * Description of the Method
74
75     *
76
77     * @param key Description of the Parameter
78
79     * @return Description of the Return Value
80
81     */

82
83    public Object JavaDoc remove(Object JavaDoc key)
84
85    {
86
87       if (key instanceof Resource)
88
89       {
90
91          return super.remove(((Resource) key).getCanonicalName());
92
93       }
94
95       return super.remove(key);
96
97    }
98
99 }
100
101
Popular Tags