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

Diff of /classpath/java/util/ListResourceBundle.java

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

revision 1.10.2.2 by gnu_andrew, Tue Aug 2 20:12:30 2005 UTC revision 1.10.2.3 by tromey, Thu Oct 6 13:41:51 2005 UTC
# Line 108  public abstract class ListResourceBundle Line 108  public abstract class ListResourceBundle
108     *     *
109     * @return an enumeration of the keys     * @return an enumeration of the keys
110     */     */
111    public Enumeration getKeys()    public Enumeration<String> getKeys()
112    {    {
113      // We make a new Set that holds all the keys, then return an enumeration      // We make a new Set that holds all the keys, then return an enumeration
114      // for that. This prevents modifications from ruining the enumeration,      // for that. This prevents modifications from ruining the enumeration,
115      // as well as ignoring duplicates.      // as well as ignoring duplicates.
116      final Object[][] contents = getContents();      final Object[][] contents = getContents();
117      Set s = new HashSet();      Set<String> s = new HashSet<String>();
118      int i = contents.length;      int i = contents.length;
119      while (--i >= 0)      while (--i >= 0)
120        s.add(contents[i][0]);        s.add((String) contents[i][0]);
121      ResourceBundle bundle = parent;      ResourceBundle bundle = parent;
122      // Eliminate tail recursion.      // Eliminate tail recursion.
123      while (bundle != null)      while (bundle != null)
124        {        {
125          Enumeration e = bundle.getKeys();          Enumeration<String> e = bundle.getKeys();
126          while (e.hasMoreElements())          while (e.hasMoreElements())
127            s.add(e.nextElement());            s.add(e.nextElement());
128          bundle = bundle.parent;          bundle = bundle.parent;

Legend:
Removed from v.1.10.2.2  
changed lines
  Added in v.1.10.2.3

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