|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.text.Collator.CollatorFactory
public abstract static class Collator.CollatorFactory
A factory used with registerFactory to register multiple collators and provide display names for them. If standard locale display names are sufficient, Collator instances may be registered instead.
Note: as of ICU4J 3.2, the default API for CollatorFactory uses ULocale instead of Locale. Instead of overriding createCollator(Locale), new implementations should override createCollator(ULocale). Note that one of these two methods MUST be overridden or else an infinite loop will occur.
Constructor Summary | |
---|---|
protected |
Collator.CollatorFactory()
Empty default constructor. |
Method Summary | |
---|---|
Collator |
createCollator(Locale loc)
Return an instance of the appropriate collator. |
Collator |
createCollator(ULocale loc)
Return an instance of the appropriate collator. |
String |
getDisplayName(Locale objectLocale,
Locale displayLocale)
Return the name of the collator for the objectLocale, localized for the displayLocale. |
String |
getDisplayName(ULocale objectLocale,
ULocale displayLocale)
Return the name of the collator for the objectLocale, localized for the displayLocale. |
abstract Set |
getSupportedLocaleIDs()
Return an unmodifiable collection of the locale names directly supported by this factory. |
boolean |
visible()
Return true if this factory will be visible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Collator.CollatorFactory()
Method Detail |
---|
public boolean visible()
public Collator createCollator(ULocale loc)
loc
- the locale for which this collator is to be created.
public Collator createCollator(Locale loc)
Note: as of ICU4J 3.2, implementations should override createCollator(ULocale) instead of this method, and inherit this method's implementation. This method is no longer abstract and instead delegates to createCollator(ULocale).
loc
- the locale for which this collator is to be created.
public String getDisplayName(Locale objectLocale, Locale displayLocale)
objectLocale
- the locale identifying the collatordisplayLocale
- the locale for which the display name of the collator should be localized
public String getDisplayName(ULocale objectLocale, ULocale displayLocale)
objectLocale
- the locale identifying the collatordisplayLocale
- the locale for which the display name of the collator should be localized
public abstract Set getSupportedLocaleIDs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |