You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2003/10/03 08:20:54 UTC

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections DefaultMapEntry.java

bayard      2003/10/02 23:20:54

  Modified:    collections/src/java/org/apache/commons/collections
                        DefaultMapEntry.java
  Log:
  Added a toString to map the normal output from a HashMaps Map.Entry
  
  Revision  Changes    Path
  1.13      +11 -2     jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapEntry.java
  
  Index: DefaultMapEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/DefaultMapEntry.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultMapEntry.java	25 Sep 2003 22:47:14 -0000	1.12
  +++ DefaultMapEntry.java	3 Oct 2003 06:20:54 -0000	1.13
  @@ -191,4 +191,13 @@
                  (getValue() == null ? 0 : getValue().hashCode()); 
       }
   
  +    /**
  +     * Written to match the output of the Map.Entry's used in 
  +     * a {@link java.util.HashMap}. 
  +     * @since 3.0
  +     */
  +    public String toString() {
  +        return ""+getKey()+"="+getValue();
  +    }
  +
   }
  
  
  

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