001: /*
002: * Copyright 2004, 2005, 2006 Odysseus Software GmbH
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 de.odysseus.calyxo.base.util;
017:
018: import java.util.Collection;
019: import java.util.Map;
020: import java.util.Set;
021:
022: /**
023: * Map implementation, which implements all <code>Map</code> methods
024: * (except the <code>get(Obejct)</code> method). All implemented methods
025: * simply throw an <code>UnsupportedOperationException</code>. This is
026: * a convenience class for easy implentations of maps, whose other
027: * methods are known to be not invoked.
028: *
029: * @author Christoph Beck
030: */
031: public abstract class MapFacade implements Map {
032:
033: /* (non-Javadoc)
034: * @see java.util.Map#size()
035: */
036: public int size() {
037: throw new UnsupportedOperationException();
038: }
039:
040: /* (non-Javadoc)
041: * @see java.util.Map#clear()
042: */
043: public void clear() {
044: throw new UnsupportedOperationException();
045: }
046:
047: /* (non-Javadoc)
048: * @see java.util.Map#isEmpty()
049: */
050: public boolean isEmpty() {
051: throw new UnsupportedOperationException();
052: }
053:
054: /* (non-Javadoc)
055: * @see java.util.Map#containsKey(java.lang.Object)
056: */
057: public boolean containsKey(Object key) {
058: throw new UnsupportedOperationException();
059: }
060:
061: /* (non-Javadoc)
062: * @see java.util.Map#containsValue(java.lang.Object)
063: */
064: public boolean containsValue(Object value) {
065: throw new UnsupportedOperationException();
066: }
067:
068: /* (non-Javadoc)
069: * @see java.util.Map#values()
070: */
071: public Collection values() {
072: throw new UnsupportedOperationException();
073: }
074:
075: /* (non-Javadoc)
076: * @see java.util.Map#putAll(java.util.Map)
077: */
078: public void putAll(Map t) {
079: throw new UnsupportedOperationException();
080: }
081:
082: /* (non-Javadoc)
083: * @see java.util.Map#entrySet()
084: */
085: public Set entrySet() {
086: throw new UnsupportedOperationException();
087: }
088:
089: /* (non-Javadoc)
090: * @see java.util.Map#keySet()
091: */
092: public Set keySet() {
093: throw new UnsupportedOperationException();
094: }
095:
096: /* (non-Javadoc)
097: * @see java.util.Map#remove(java.lang.Object)
098: */
099: public Object remove(Object key) {
100: throw new UnsupportedOperationException();
101: }
102:
103: /* (non-Javadoc)
104: * @see java.util.Map#put(java.lang.Object, java.lang.Object)
105: */
106: public Object put(Object key, Object value) {
107: throw new UnsupportedOperationException();
108: }
109:
110: }
|