commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections ProxyMap.java
Date Sat, 26 Apr 2003 11:15:35 GMT
scolebourne    2003/04/26 04:15:34

  Modified:    collections/src/java/org/apache/commons/collections
                        ProxyMap.java
  Log:
  Updated javadoc
  Updated copyright year
  
  Revision  Changes    Path
  1.6       +34 -26    jakarta-commons/collections/src/java/org/apache/commons/collections/ProxyMap.java
  
  Index: ProxyMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/ProxyMap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ProxyMap.java	15 Aug 2002 20:04:31 -0000	1.5
  +++ ProxyMap.java	26 Apr 2003 11:15:34 -0000	1.6
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -71,130 +68,141 @@
    * build to extensions for its wrapped <code>Map</code> object which
    * would be unavailable or inconvenient via sub-classing (but usable
    * via composition).</p>
  + * 
  + * <p>This implementation does not perform any special processing with
  + * {@link #entrySet()}, {@link #keySet()} or {@link #values()}. Instead
  + * it simply returns the set/collection from the wrapped map. This may be
  + * undesirable, for example if you are trying to write a validating
  + * implementation it would provide a loophole around the validation. But,
  + * you might want that loophole, so this class is kept simple.</p>
    *
    * <p>An example use case is where the wrapped <code>Map</code> needs
    * synchronization (to make it thread-safe), but the <code>Map</code>
    * returned by <code>Collections.synchronizedMap(map)</code>
    * hides part of <code>map</code>'s public interface.</p>
    *
  - * @since 2.0
  + * @since Commons Collections 2.0
  + * @version $Revision$ $Date$
  + * 
    * @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
  + * @author Stephen Colebourne
    */
   public abstract class ProxyMap implements Map {
       
       /**
  -     * The <code>Map</code> used for default implementations.
  +     * The <code>Map</code> to delegate to.
        */
       protected Map map;
   
       /**
  -     * Creates a new instance acting as a representative for the
  -     * specified <code>Map</code>.
  +     * Constructor that uses the specified map to delegate to.
  +     * <p>
  +     * Note that the map is used for delegation, and is not copied. This is
  +     * different to the normal use of a <code>Map</code> parameter in
  +     * collections constructors.
        *
  -     * @param map The <code>Map</code> to whose operations to wrap.
  +     * @param map  the <code>Map</code> to delegate to
        */
       public ProxyMap(Map map) {
           this.map = map;
       }
   
       /**
  -     *  Invokes the underlying {@link Map#clear()} method.
  +     * Invokes the underlying {@link Map#clear()} method.
        */
       public void clear() {
           map.clear();
       }
   
       /**
  -     *  Invokes the underlying {@link Map#containsKey(Object)} method.
  +     * Invokes the underlying {@link Map#containsKey(Object)} method.
        */
       public boolean containsKey(Object key) {
           return map.containsKey(key);
       }
   
       /**
  -     *  Invokes the underlying {@link Map#containsValue(Object)} method.
  +     * Invokes the underlying {@link Map#containsValue(Object)} method.
        */
       public boolean containsValue(Object value) {
           return map.containsValue(value);
       }
   
       /**
  -     *  Invokes the underlying {@link Map#entrySet()} method.
  +     * Invokes the underlying {@link Map#entrySet()} method.
        */
       public Set entrySet() {
           return map.entrySet();
       }
   
       /**
  -     *  Invokes the underlying {@link Map#equals(Object)} method.
  +     * Invokes the underlying {@link Map#equals(Object)} method.
        */
       public boolean equals(Object m) {
           return map.equals(m);
       }
   
       /**
  -     *  Invokes the underlying {@link Map#get(Object)} method.
  +     * Invokes the underlying {@link Map#get(Object)} method.
        */
       public Object get(Object key) {
           return map.get(key);
       }
   
       /**
  -     *  Invokes the underlying {@link Map#hashCode()} method.
  +     * Invokes the underlying {@link Map#hashCode()} method.
        */
       public int hashCode() {
           return map.hashCode();
       }
   
       /**
  -     *  Invokes the underlying {@link Map#isEmpty()} method.
  +     * Invokes the underlying {@link Map#isEmpty()} method.
        */
       public boolean isEmpty() {
           return map.isEmpty();
       }
   
       /**
  -     *  Invokes the underlying {@link Map#keySet()} method.
  +     * Invokes the underlying {@link Map#keySet()} method.
        */
       public Set keySet() {
           return map.keySet();
       }
   
       /**
  -     *  Invokes the underlying {@link Map#put(Object,Object)} method.
  +     * Invokes the underlying {@link Map#put(Object,Object)} method.
        */
       public Object put(Object key, Object value) {
           return map.put(key, value);
       }
   
       /**
  -     *  Invokes the underlying {@link Map#putAll(Map)} method.
  +     * Invokes the underlying {@link Map#putAll(Map)} method.
        */
       public void putAll(Map t) {
           map.putAll(t);
       }
   
       /**
  -     *  Invokes the underlying {@link Map#remove(Object)} method.
  +     * Invokes the underlying {@link Map#remove(Object)} method.
        */
       public Object remove(Object key) {
           return map.remove(key);
       }
   
       /**
  -     *  Invokes the underlying {@link Map#size()} method.
  +     * Invokes the underlying {@link Map#size()} method.
        */
       public int size() {
           return map.size();
       }
   
       /**
  -     *  Invokes the underlying {@link Map#values()} method.
  +     * Invokes the underlying {@link Map#values()} method.
        */
       public Collection values() {
           return map.values();
       }
      
   }
  -
  -
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message