/[classpath]/classpath/java/util/Collections.java
ViewVC logotype

Diff of /classpath/java/util/Collections.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by mark, Tue Jan 22 22:27:01 2002 UTC revision 1.26 by ericb, Fri Feb 15 15:44:56 2002 UTC
# Line 1  Line 1 
1  /* Collections.java -- Utility class with methods to operate on collections  /* Collections.java -- Utility class with methods to operate on collections
2     Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.     Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 726  public class Collections Line 726  public class Collections
726    }    }
727    
728    /**    /**
729     * Returns an array list holding the elements visited by a given     * Returns an ArrayList holding the elements visited by a given
730     * Enumeration. This method exists for interoperability between legacy     * Enumeration. This method exists for interoperability between legacy
731     * APIs and the new Collection API.     * APIs and the new Collection API.
732     *     *
# Line 735  public class Collections Line 735  public class Collections
735     * @see ArrayList     * @see ArrayList
736     * @since 1.4     * @since 1.4
737     */     */
738    public static List list(Enumeration e)    public static ArrayList list(Enumeration e)
739    {    {
740      List l = new ArrayList();      ArrayList l = new ArrayList();
741      while (e.hasMoreElements())      while (e.hasMoreElements())
742        l.add(e.nextElement());        l.add(e.nextElement());
743      return l;      return l;

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26