Added a toString to map the normal output from a HashMaps Map.Entry

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131225 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2003-10-03 06:20:54 +00:00
parent f18bec8711
commit 5c8de4eb74
1 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/DefaultMapEntry.java,v 1.12 2003/09/25 22:47:14 scolebourne Exp $
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/DefaultMapEntry.java,v 1.13 2003/10/03 06:20:54 bayard Exp $
* ====================================================================
*
* The Apache Software License, Version 1.1
@ -63,7 +63,7 @@ import java.util.Map;
* A default implementation of {@link java.util.Map.Entry}
*
* @since Commons Collections 1.0
* @version $Revision: 1.12 $ $Date: 2003/09/25 22:47:14 $
* @version $Revision: 1.13 $ $Date: 2003/10/03 06:20:54 $
*
* @author James Strachan
* @author Michael A. Smith
@ -191,4 +191,13 @@ public class DefaultMapEntry implements Map.Entry {
(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();
}
}