/// <summary> /// Returns the service object if kind/locale match. Service is not used. /// </summary> /// public override Object Create(ICUService.Key key, ICUService service) { ICULocaleService.LocaleKey lkey = (ICULocaleService.LocaleKey)key; if (kind == IBM.ICU.Impl.ICULocaleService.LocaleKey.KIND_ANY || kind == lkey.Kind()) { String keyID = lkey.CurrentID(); if (id.Equals(keyID)) { return(obj); } } return(null); }
/// <summary> /// Implement superclass abstract method. This checks the currentID of /// the key against the supported IDs, and passes the canonicalLocale and /// kind off to handleCreate (which subclasses must implement). /// </summary> /// public virtual Object Create(ICUService.Key key, ICUService service) { if (HandlesKey(key)) { ICULocaleService.LocaleKey lkey = (ICULocaleService.LocaleKey)key; int kind_0 = lkey.Kind(); ULocale uloc = lkey.CurrentLocale(); return(HandleCreate(uloc, kind_0, service)); } else { // System.out.println("factory: " + this + // " did not support id: " + key.currentID()); // System.out.println("supported ids: " + getSupportedIDs()); } return(null); }