internal void RegisterFactories(ICUService service_0, ICollection c) { IIterator iter = new ILOG.J2CsMapping.Collections.IteratorAdapter(c.GetEnumerator()); while (iter.HasNext()) { service_0.RegisterFactory((IBM.ICU.Impl.ICUService.Factory)iter.Next()); } }
protected internal override void Iterate() { ILOG.J2CsMapping.Collections.ISet ids = service.GetVisibleIDs(); IIterator iter = new ILOG.J2CsMapping.Collections.IteratorAdapter(ids.GetEnumerator()); int n_0 = 10; while (--n_0 >= 0 && iter.HasNext()) { String id = (String)iter.Next(); Object result = service.Get(id); log.Logln("iter: " + n_0 + " id: " + id + " result: " + result); } }
// return a collection of unique factories, might be fewer than requested internal ICollection GetFactoryCollection(int requested) { ILOG.J2CsMapping.Collections.ISet locales = new HashedSet(); for (int i = 0; i < requested; ++i) { ILOG.J2CsMapping.Collections.Generics.Collections.Add(locales, GetCLV()); } IList factories_0 = new ArrayList(locales.Count); IIterator iter = new ILOG.J2CsMapping.Collections.IteratorAdapter(locales.GetEnumerator()); while (iter.HasNext()) { ILOG.J2CsMapping.Collections.Generics.Collections.Add(factories_0, new ICUServiceThreadTest.TestFactory((String)iter.Next())); } return(factories_0); }
protected internal override void Iterate() { IDictionary names = IBM.ICU.Charset.ICUServiceThreadTest.GetDisplayNames(service, locale); IIterator iter = new ILOG.J2CsMapping.Collections.IteratorAdapter(names.GetEnumerator()); int n_0 = 10; while (--n_0 >= 0 && iter.HasNext()) { DictionaryEntry e = (DictionaryEntry)iter.Next(); String dname = (String)((DictionaryEntry)e).Key; String id = (String)((DictionaryEntry)e).Value; Object result = service.Get(id); // Note: IllegalMonitorStateException is thrown by the code // below on IBM JRE5 for AIX 64bit. For some reason, converting // int to String out of this statement resolves the issue. // log.logln(" iter: " + n + String num = ILOG.J2CsMapping.Util.IlNumber.ToString(n_0); log.Logln(" iter: " + num + " dname: " + dname + " id: " + id + " result: " + result); } }