01: /* Copyright (C) 2003 Finalist IT Group
02: *
03: * This file is part of JAG - the Java J2EE Application Generator
04: *
05: * JAG is free software; you can redistribute it and/or modify
06: * it under the terms of the GNU General Public License as published by
07: * the Free Software Foundation; either version 2 of the License, or
08: * (at your option) any later version.
09: * JAG 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
12: * GNU General Public License for more details.
13: * You should have received a copy of the GNU General Public License
14: * along with JAG; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16: */
17:
18: package com.finalist.jag;
19:
20: /**
21: * Class AttributeMap
22: *
23: *
24: * @author Wendel D. de Witte
25: * @version %I%, %G%
26: */
27: public class AttributeMap extends java.util.HashMap {
28:
29: /**
30: * Method getAttribute
31: *
32: *
33: * @param name
34: *
35: * @return
36: *
37: */
38: public Object getAttribute(String name) {
39: return get(name);
40: }
41:
42: /**
43: * Method setAttribute
44: *
45: *
46: * @param name
47: * @param obj
48: *
49: */
50: public void setAttribute(String name, Object obj) {
51:
52: if ((name == null) || (obj == null)) {
53: return;
54: }
55:
56: put(name, obj);
57: }
58:
59: /**
60: * Method removeAttribute
61: *
62: *
63: * @param name
64: *
65: * @return
66: *
67: */
68: public Object removeAttribute(String name) {
69:
70: if ((name == null) || isEmpty()) {
71: return null;
72: }
73:
74: return remove(name);
75: }
76: }
|