Package com.ibm.icu.impl
Class ICULocaleService.LocaleKeyFactory
java.lang.Object
com.ibm.icu.impl.ICULocaleService.LocaleKeyFactory
- All Implemented Interfaces:
ICUService.Factory
- Direct Known Subclasses:
ICULocaleService.ICUResourceBundleFactory
,ICULocaleService.SimpleLocaleKeyFactory
,NumberFormatServiceShim.NFFactory
- Enclosing class:
- ICULocaleService
public abstract static class ICULocaleService.LocaleKeyFactory
extends Object
implements ICUService.Factory
A subclass of Factory that uses LocaleKeys. If 'visible' the
factory reports its IDs.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LocaleKeyFactory
(boolean visible) Constructor used by subclasses.protected
LocaleKeyFactory
(boolean visible, String name) Constructor used by subclasses. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ICUService.Key key, ICUService service) Implement superclass abstract method.getDisplayName
(String id, ULocale locale) Return a localized name for the locale represented by id.Return the set of ids that this factory supports (visible or otherwise).protected Object
handleCreate
(ULocale loc, int kind, ICUService service) Utility method used by create(Key, ICUService).protected boolean
handlesKey
(ICUService.Key key) protected boolean
isSupportedID
(String id) Return true if this id is one the factory supports (visible or otherwise).toString()
For debugging.void
updateVisibleIDs
(Map<String, ICUService.Factory> result) Override of superclass method.
-
Field Details
-
name
-
visible
protected final boolean visible -
VISIBLE
public static final boolean VISIBLE- See Also:
-
INVISIBLE
public static final boolean INVISIBLE- See Also:
-
-
Constructor Details
-
LocaleKeyFactory
protected LocaleKeyFactory(boolean visible) Constructor used by subclasses. -
LocaleKeyFactory
Constructor used by subclasses.
-
-
Method Details
-
create
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).- Specified by:
create
in interfaceICUService.Factory
-
handlesKey
-
updateVisibleIDs
Override of superclass method.- Specified by:
updateVisibleIDs
in interfaceICUService.Factory
-
getDisplayName
Return a localized name for the locale represented by id.- Specified by:
getDisplayName
in interfaceICUService.Factory
-
handleCreate
Utility method used by create(Key, ICUService). Subclasses can implement this instead of create. -
isSupportedID
Return true if this id is one the factory supports (visible or otherwise). -
getSupportedIDs
Return the set of ids that this factory supports (visible or otherwise). This can be called often and might need to be cached if it is expensive to create. -
toString
For debugging.
-