private bool isStrResPrepared; // for STRING resouce, we only // prepare once internal IteratorAdapter(UResourceBundle theRes) { this.preparedNextElement = null; this.isStrRes = false; this.isStrResPrepared = false; IBM.ICU.Charset.ResourceModule.Assert_not(theRes == null); res = theRes; itr = ((ICUResourceBundle)res).GetIterator(); isStrRes = res.GetType() == IBM.ICU.Util.UResourceBundle.STRING; }
protected internal override String[] HandleGetStringArray() { String[] strings = new String[size]; UResourceBundleIterator iter = GetIterator(); int i = 0; while (iter.HasNext()) { strings[i++] = iter.Next().GetString(); } return(strings); }
private void LoadDates() { CalendarData calData = new CalendarData(fLocale, calendar.GetType()); UResourceBundle rb = calData.Get("fields", "day", "relative"); ILOG.J2CsMapping.Collections.ISet datesSet = new SortedSet(new RelativeDateFormat.Anonymous_C0()); for (UResourceBundleIterator i = rb.GetIterator(); i.HasNext();) { UResourceBundle line = i.Next(); String k = line.GetKey(); String v = line.GetString(); RelativeDateFormat.URelativeString rs = new RelativeDateFormat.URelativeString(k, v); ILOG.J2CsMapping.Collections.Generics.Collections.Add(datesSet, rs); } fDates = new RelativeDateFormat.URelativeString [0]; fDates = (RelativeDateFormat.URelativeString [])ILOG.J2CsMapping.Collections.Generics.Collections.ToArray(datesSet, fDates); }