Package com.ibm.icu.util

Examples of com.ibm.icu.util.UResourceBundleIterator


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

            String nsName;
            ArrayList output = new ArrayList();
            UResourceBundleIterator it = nsCurrent.getIterator();
            while (it.hasNext()) {
                temp = it.next();
                nsName = temp.getKey();
                output.add(nsName);
            }
            return (String[]) output.toArray(new String[output.size()]);
    }
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

        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

        return bundle.getStringArray();
    }
    public String[] getDateTimePatterns(){
        ICUResourceBundle bundle = get("DateTimePatterns");
        ArrayList list = new ArrayList();
        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

    }

    public String[] getOverrides(){
        ICUResourceBundle bundle = get("DateTimePatterns");
        ArrayList list = new ArrayList();
        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

            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

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

  private static class ResourceArray extends ResourceContainer {
    @Override
    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

        contextTransformsBundle = (UResourceBundle) rb.getWithFallback("contextTransforms");
      } 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

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.