Interface ICUService.Factory

    • Method Detail

      • create

        java.lang.Object create​(ICUService.Key key,
                                ICUService service)
        Create a service object from the key, if this factory supports the key. Otherwise, return null.

        If the factory supports the key, then it can call the service's getKey(Key, String[], Factory) method passing itself as the factory to get the object that the service would have created prior to the factory's registration with the service. This can change the key, so any information required from the key should be extracted before making such a callback.

      • updateVisibleIDs

        void updateVisibleIDs​(java.util.Map<java.lang.String,​ICUService.Factory> result)
        Update the result IDs (not descriptors) to reflect the IDs this factory handles. This function and getDisplayName are used to support ICUService.getDisplayNames. Basically, the factory has to determine which IDs it will permit to be available, and of those, which it will provide localized display names for. In most cases this reflects the IDs that the factory directly supports.
      • getDisplayName

        java.lang.String getDisplayName​(java.lang.String id,
                                        ULocale locale)
        Return the display name for this id in the provided locale. This is an localized id, not a descriptor. If the id is not visible or not defined by the factory, return null. If locale is null, return id unchanged.