Examples of UResourceBundleIterator


Examples of com.ibm.icu.util.UResourceBundleIterator

    bundle = (ICUResourceBundle) bundle.get(INSTALLED_LOCALES);
    int length = bundle.getSize();
    int i = 0;
    ULocale[] locales = new ULocale[length];
    UResourceBundleIterator iter = bundle.getIterator();
    iter.reset();
    while (iter.hasNext()) {
      String locstr = iter.next().getKey();
      if (locstr.equals("root")) {
        locales[i++] = ULocale.ROOT;
      } else {
        locales[i++] = new ULocale(locstr);
      }
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

    ICUResourceBundle bundle = (ICUResourceBundle) UResourceBundle.instantiateBundle(baseName, ICU_RESOURCE_INDEX, root, true);
    bundle = (ICUResourceBundle) bundle.get(INSTALLED_LOCALES);
    int length = bundle.getSize();
    int i = 0;
    String[] locales = new String[length];
    UResourceBundleIterator iter = bundle.getIterator();
    iter.reset();
    while (iter.hasNext()) {
      String locstr = iter.next().getKey();
      if (locstr.equals("root")) {
        locales[i++] = ULocale.ROOT.toString();
      } else {
        locales[i++] = locstr;
      }
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

  }

  public String[] getDateTimePatterns() {
    ICUResourceBundle bundle = get("DateTimePatterns");
    ArrayList<String> list = new ArrayList<String>();
    UResourceBundleIterator iter = bundle.getIterator();
    while (iter.hasNext()) {
      UResourceBundle patResource = iter.next();
      int resourceType = patResource.getType();
      switch (resourceType) {
      case UResourceBundle.STRING:
        list.add(patResource.getString());
        break;
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

  }

  public String[] getOverrides() {
    ICUResourceBundle bundle = get("DateTimePatterns");
    ArrayList<String> list = new ArrayList<String>();
    UResourceBundleIterator iter = bundle.getIterator();
    while (iter.hasNext()) {
      UResourceBundle patResource = iter.next();
      int resourceType = patResource.getType();
      switch (resourceType) {
      case UResourceBundle.STRING:
        list.add(null);
        break;
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

        bundle = (ICUResourceBundle)bundle.get(INSTALLED_LOCALES);
        int length = bundle.getSize();
        int i = 0;
        ULocale[] locales = new ULocale[length];
        UResourceBundleIterator iter = bundle.getIterator();
        iter.reset();
        while (iter.hasNext()) {
            String locstr = iter.next().getKey();
            if (locstr.equals("root")) {
                locales[i++] = ULocale.ROOT;
            } else {
                locales[i++] = new ULocale(locstr);
            }
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

        ICUResourceBundle bundle = (ICUResourceBundle) UResourceBundle.instantiateBundle( baseName, ICU_RESOURCE_INDEX, root, true);
        bundle = (ICUResourceBundle)bundle.get(INSTALLED_LOCALES);
        int length = bundle.getSize();
        int i = 0;
        String[] locales = new String[length];
        UResourceBundleIterator iter = bundle.getIterator();
        iter.reset();
        while (iter.hasNext()) {
            String locstr = iter.next(). getKey();
            if (locstr.equals("root")) {
                locales[i++] = ULocale.ROOT.toString();
            } else {
                locales[i++] = locstr;
            }
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

        return bundle.getStringArray();
    }
    public String[] getDateTimePatterns(){
        ICUResourceBundle bundle = get("DateTimePatterns");
        ArrayList<String> list = new ArrayList<String>();
        UResourceBundleIterator iter = bundle.getIterator();
        while (iter.hasNext()) {
            UResourceBundle patResource = iter.next();
            int resourceType = patResource.getType();
            switch (resourceType) {
                case UResourceBundle.STRING:
                    list.add(patResource.getString());
                    break;
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

    }

    public String[] getOverrides(){
        ICUResourceBundle bundle = get("DateTimePatterns");
        ArrayList<String> list = new ArrayList<String>();
        UResourceBundleIterator iter = bundle.getIterator();
        while (iter.hasNext()) {
            UResourceBundle patResource = iter.next();
            int resourceType = patResource.getType();
            switch (resourceType) {
                case UResourceBundle.STRING:
                    list.add(null);
                    break;
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

            description = bundle.getString(rulenames[format-1]);
        }
        catch (MissingResourceException e) {
            try {
                ICUResourceBundle rules = bundle.getWithFallback("RBNFRules/"+rulenames[format-1]);
                UResourceBundleIterator it = rules.getIterator();
                while (it.hasNext()) {
                   description = description.concat(it.nextString());
                }
            }
            catch (MissingResourceException e1) {
            }
        }
View Full Code Here

Examples of com.ibm.icu.util.UResourceBundleIterator

            UResourceBundle nsCurrent = numberingSystemsInfo.get("numberingSystems");
            UResourceBundle temp;

            String nsName;
            ArrayList<String> output = new ArrayList<String>();
            UResourceBundleIterator it = nsCurrent.getIterator();
            while (it.hasNext()) {
                temp = it.next();
                nsName = temp.getKey();
                output.add(nsName);
            }
            return output.toArray(new String[output.size()]);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.