Source Code Cross Referenced for ProxyMap.java in  » Library » Apache-common-Collections » org » apache » commons » collections » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache common Collections » org.apache.commons.collections 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Copyright 2002-2004 The Apache Software Foundation
003:         *
004:         *  Licensed under the Apache License, Version 2.0 (the "License");
005:         *  you may not use this file except in compliance with the License.
006:         *  You may obtain a copy of the License at
007:         *
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         *  Unless required by applicable law or agreed to in writing, software
011:         *  distributed under the License is distributed on an "AS IS" BASIS,
012:         *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         *  See the License for the specific language governing permissions and
014:         *  limitations under the License.
015:         */
016:        package org.apache.commons.collections;
017:
018:        import java.util.Collection;
019:        import java.util.Map;
020:        import java.util.Set;
021:
022:        /** 
023:         * <p>This <code>Map</code> wraps another <code>Map</code>
024:         * implementation, using the wrapped instance for its default
025:         * implementation.  This class is used as a framework on which to
026:         * build to extensions for its wrapped <code>Map</code> object which
027:         * would be unavailable or inconvenient via sub-classing (but usable
028:         * via composition).</p>
029:         * 
030:         * <p>This implementation does not perform any special processing with
031:         * {@link #entrySet()}, {@link #keySet()} or {@link #values()}. Instead
032:         * it simply returns the set/collection from the wrapped map. This may be
033:         * undesirable, for example if you are trying to write a validating
034:         * implementation it would provide a loophole around the validation. But,
035:         * you might want that loophole, so this class is kept simple.</p>
036:         *
037:         * @deprecated Moved to map subpackage as AbstractMapDecorator. It will be removed in v4.0.
038:         * @since Commons Collections 2.0
039:         * @version $Revision: 155406 $ $Date: 2005-02-26 12:55:26 +0000 (Sat, 26 Feb 2005) $
040:         * 
041:         * @author Daniel Rall
042:         * @author Stephen Colebourne
043:         */
044:        public abstract class ProxyMap implements  Map {
045:
046:            /**
047:             * The <code>Map</code> to delegate to.
048:             */
049:            protected Map map;
050:
051:            /**
052:             * Constructor that uses the specified map to delegate to.
053:             * <p>
054:             * Note that the map is used for delegation, and is not copied. This is
055:             * different to the normal use of a <code>Map</code> parameter in
056:             * collections constructors.
057:             *
058:             * @param map  the <code>Map</code> to delegate to
059:             */
060:            public ProxyMap(Map map) {
061:                this .map = map;
062:            }
063:
064:            /**
065:             * Invokes the underlying {@link Map#clear()} method.
066:             */
067:            public void clear() {
068:                map.clear();
069:            }
070:
071:            /**
072:             * Invokes the underlying {@link Map#containsKey(Object)} method.
073:             */
074:            public boolean containsKey(Object key) {
075:                return map.containsKey(key);
076:            }
077:
078:            /**
079:             * Invokes the underlying {@link Map#containsValue(Object)} method.
080:             */
081:            public boolean containsValue(Object value) {
082:                return map.containsValue(value);
083:            }
084:
085:            /**
086:             * Invokes the underlying {@link Map#entrySet()} method.
087:             */
088:            public Set entrySet() {
089:                return map.entrySet();
090:            }
091:
092:            /**
093:             * Invokes the underlying {@link Map#equals(Object)} method.
094:             */
095:            public boolean equals(Object m) {
096:                return map.equals(m);
097:            }
098:
099:            /**
100:             * Invokes the underlying {@link Map#get(Object)} method.
101:             */
102:            public Object get(Object key) {
103:                return map.get(key);
104:            }
105:
106:            /**
107:             * Invokes the underlying {@link Map#hashCode()} method.
108:             */
109:            public int hashCode() {
110:                return map.hashCode();
111:            }
112:
113:            /**
114:             * Invokes the underlying {@link Map#isEmpty()} method.
115:             */
116:            public boolean isEmpty() {
117:                return map.isEmpty();
118:            }
119:
120:            /**
121:             * Invokes the underlying {@link Map#keySet()} method.
122:             */
123:            public Set keySet() {
124:                return map.keySet();
125:            }
126:
127:            /**
128:             * Invokes the underlying {@link Map#put(Object,Object)} method.
129:             */
130:            public Object put(Object key, Object value) {
131:                return map.put(key, value);
132:            }
133:
134:            /**
135:             * Invokes the underlying {@link Map#putAll(Map)} method.
136:             */
137:            public void putAll(Map t) {
138:                map.putAll(t);
139:            }
140:
141:            /**
142:             * Invokes the underlying {@link Map#remove(Object)} method.
143:             */
144:            public Object remove(Object key) {
145:                return map.remove(key);
146:            }
147:
148:            /**
149:             * Invokes the underlying {@link Map#size()} method.
150:             */
151:            public int size() {
152:                return map.size();
153:            }
154:
155:            /**
156:             * Invokes the underlying {@link Map#values()} method.
157:             */
158:            public Collection values() {
159:                return map.values();
160:            }
161:
162:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.