Package com.ibm.icu.util

Examples of com.ibm.icu.util.UResourceBundleIterator


        }
    }
    private static class ResourceArray extends ResourceContainer {
        protected String[] handleGetStringArray() {
            String[] strings = new String[value.getSize()];
            UResourceBundleIterator iter = getIterator();
            int i = 0;
            while (iter.hasNext()) {
                strings[i++] = iter.next().getString();
            }
            return strings;
        }
View Full Code Here


        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()) {
            locales[i++] = new ULocale(iter.next().getKey());
        }
        bundle = null;
        return locales;
    }
View Full Code Here

        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()) {
            locales[i++] = iter.next().getKey();
        }
        bundle = null;
        return locales;
    }
View Full Code Here

class ICUResourceBundleImpl {

    static final class ResourceArray extends ICUResourceBundle {
        protected String[] handleGetStringArray() {
            String[] strings = new String[size];
            UResourceBundleIterator iter = getIterator();
            int i = 0;
            while (iter.hasNext()) {
                strings[i++] = iter.next().getString();
            }
            return strings;
        }
View Full Code Here

            Set s = new HashSet();
            try {
                UResourceBundle supplementalDataBundle = UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "supplementalData", ICUResourceBundle.ICU_DATA_CLASS_LOADER);
   
                UResourceBundle zoneFormatting = supplementalDataBundle.get("zoneFormatting");
                UResourceBundleIterator it = zoneFormatting.getIterator();
   
                while ( it.hasNext()) {
                    UResourceBundle temp = it.next();
                    int resourceType = temp.getType();
   
                    switch(resourceType) {
                        case UResourceBundle.TABLE:
                            String [] result = { "", "" };
View Full Code Here

        }
        catch (MissingResourceException e) {
            contextTransformsBundle = null; // probably redundant
        }
        if (contextTransformsBundle != null) {
            UResourceBundleIterator ctIterator = contextTransformsBundle.getIterator();
            while ( ctIterator.hasNext() ) {
                UResourceBundle contextTransformUsage = ctIterator.next();
                int[] intVector = contextTransformUsage.getIntVector();
                if (intVector.length >= 2) {
                    String usageKey = contextTransformUsage.getKey();
                    CapitalizationContextUsage usage = contextUsageTypeMap.get(usageKey);
                    if (usage != null) {
View Full Code Here

            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

    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

Related Classes of com.ibm.icu.util.UResourceBundleIterator

Copyright © 2018 www.massapicom. 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.