commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections MapUtils.java
Date Sun, 13 Oct 2002 22:31:35 GMT
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:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message