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 [EMAIL PROTECTED] java.util.HashMap}.
+ * @since 3.0
+ */
+ public String toString() {
+ return ""+getKey()+"="+getValue();
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]