scolebourne 2002/10/13 15:31:35
Modified: collections/src/java/org/apache/commons/collections
MapUtils.java
Log:
Javadoc improvement
Revision Changes Path
1.14 +11 -7
jakarta-commons/collections/src/java/org/apache/commons/collections/MapUtils.java
Index: MapUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/MapUtils.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- MapUtils.java 13 Oct 2002 00:38:36 -0000 1.13
+++ MapUtils.java 13 Oct 2002 22:31:35 -0000 1.14
@@ -593,12 +593,16 @@
//-------------------------------------------------------------------------
/**
- * Synonym for <Code>new Properties(input)</COde>.
+ * Gets a new Properties object initialised with the values from a Map.
+ * A null input will return an empty properties object.
+ *
+ * @param map the map to convert to a Properties object
+ * @return the properties object
*/
- public static Properties toProperties(Map input) {
+ public static Properties toProperties(Map map) {
Properties answer = new Properties();
- if ( input != null ) {
- for ( Iterator iter = input.entrySet().iterator(); iter.hasNext(); ) {
+ if (map != null) {
+ for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry) iter.next();
Object key = entry.getKey();
Object value = entry.getValue();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>