/** {@inheritDoc} */ public Object remove(Object key) { validateKey(key); return map.remove(key); }
/** {@inheritDoc} */ public Object get(Object key) { validateKey(key); return map.get(key); }
/** * This method is only needed for Java 1.4 compatibility. * * @deprecated use put(String, Object) instead */ public Object put(Object key, Object value) { validateKey(key); return map.put(key,value); }
/** {@inheritDoc} */ public boolean containsKey(Object key) { validateKey(key); return map.containsKey(key); } /** {@inheritDoc} */
/** * Associates the specified value with the specified key in a * java.util.Map. If the map previously contained a mapping for * this key, the old value is replaced. * * @param key the String value which uniquely identifies the * object * @param value the object to be stored. * * @return the previous value for the mapping or <tt>null</tt> if there was none. * * @throws NullPointerException if the key is <tt>null</tt> * @throws IllegalArgumentException if the key is the empty String */ public Object put(String key, Object value) { validateKey(key); return map.put(key,value); }
/** {@inheritDoc} */ public void putAll(Map/*<? extends String,? extends Object>*/ toMerge) { Set keySet= toMerge.keySet(); Iterator keys= keySet.iterator(); while (keys.hasNext()) { validateKey(keys.next()); } map.putAll(toMerge); }