Javadoc improvement

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130833 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2002-10-13 22:31:35 +00:00
parent 86df16092e
commit 7b54609df8
1 changed files with 11 additions and 7 deletions

View File

@ -1,7 +1,7 @@
/* /*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MapUtils.java,v 1.13 2002/10/13 00:38:36 scolebourne Exp $ * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MapUtils.java,v 1.14 2002/10/13 22:31:35 scolebourne Exp $
* $Revision: 1.13 $ * $Revision: 1.14 $
* $Date: 2002/10/13 00:38:36 $ * $Date: 2002/10/13 22:31:35 $
* *
* ==================================================================== * ====================================================================
* *
@ -593,12 +593,16 @@ public class MapUtils {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/** /**
* 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(); Properties answer = new Properties();
if ( input != null ) { if (map != null) {
for ( Iterator iter = input.entrySet().iterator(); iter.hasNext(); ) { for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
Map.Entry entry = (Map.Entry) iter.next(); Map.Entry entry = (Map.Entry) iter.next();
Object key = entry.getKey(); Object key = entry.getKey();
Object value = entry.getValue(); Object value = entry.getValue();