Class ICULocaleService.LocaleKeyFactory

    • Constructor Detail

      • LocaleKeyFactory

        protected LocaleKeyFactory​(boolean visible)
        Constructor used by subclasses.
      • LocaleKeyFactory

        protected LocaleKeyFactory​(boolean visible,
                                   String name)
        Constructor used by subclasses.
    • Method Detail

      • create

        public Object create​(ICUService.Key key,
                             ICUService service)
        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 interface ICUService.Factory
      • handleCreate

        protected Object handleCreate​(ULocale loc,
                                      int kind,
                                      ICUService service)
        Utility method used by create(Key, ICUService). Subclasses can implement this instead of create.
      • isSupportedID

        protected boolean isSupportedID​(String id)
        Return true if this id is one the factory supports (visible or otherwise).
      • getSupportedIDs

        protected Set<String> 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

        public String toString()
        For debugging.
        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.