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

Diff of /classpath/java/util/Locale.java

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

revision 1.19.2.5 by gnu_andrew, Fri May 20 18:20:56 2005 UTC revision 1.19.2.6 by gnu_andrew, Fri May 27 00:01:45 2005 UTC
# Line 453  public final class Locale implements Ser Line 453  public final class Locale implements Ser
453     */     */
454    private static String[] getISOStrings(String tableName)    private static String[] getISOStrings(String tableName)
455    {    {
     List tempList;  
     ResourceBundle bundle;  
     Enumeration keys;  
456      int count = 0;      int count = 0;
457      String[] strings;      ResourceBundle bundle =
458          ResourceBundle.getBundle("gnu.java.locale.LocaleInformation");
459        Enumeration e = bundle.getKeys();
460        ArrayList tempList = new ArrayList();
461    
462      tempList = new ArrayList();      while (e.hasMoreElements())
     bundle = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation");  
     keys = ((Hashtable) bundle.getObject(tableName)).keys();  
     while (keys.hasMoreElements())  
463        {        {
464          String nextString;          String key = (String) e.nextElement();
465            
466          nextString = (String) keys.nextElement();          if (key.startsWith(tableName + "."))
         if (nextString.length() == 2 &&  
             Character.isLetter(nextString.charAt(0)) &&  
             Character.isLetter(nextString.charAt(1)))  
467            {            {
468              tempList.add(nextString);              String str = key.substring(tableName.length() + 1);
469              ++count;  
470                if (str.length() == 2
471                    && Character.isLetter(str.charAt(0))
472                    && Character.isLetter(str.charAt(1)))
473                  {
474                    tempList.add(str);
475                    ++count;
476                  }
477            }            }
478        }        }
479      strings = new String[count];  
480        String[] strings = new String[count];
481        
482      for (int a = 0; a < count; ++a)      for (int a = 0; a < count; ++a)
483        {        strings[a] = (String) tempList.get(a);
484          strings[a] = (String) tempList.get(a);      
       }  
485      return strings;      return strings;
486    }    }
487    

Legend:
Removed from v.1.19.2.5  
changed lines
  Added in v.1.19.2.6

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