Interface TextCollatorRegistry
-
- All Known Implementing Classes:
TextCollatorRegistryJRE
@API(EXPERIMENTAL) public interface TextCollatorRegistry
Registry forTextCollator
s. The registry maps locale name and strength to a thread-safe instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default TextCollator
getTextCollator()
Get a weak text collator for the default locale.TextCollator
getTextCollator(int strength)
Get a text collator of the specified strength for the default locale.default TextCollator
getTextCollator(String locale)
Get a weak text collator for the given locale.TextCollator
getTextCollator(String locale, int strength)
Get a text collator of the specified strength for the given locale.
-
-
-
Method Detail
-
getTextCollator
@Nonnull default TextCollator getTextCollator()
Get a weak text collator for the default locale. In general, this means one that is case- and accent-insensitive.- Returns:
- a weak text collator for the default locale
-
getTextCollator
@Nonnull TextCollator getTextCollator(int strength)
Get a text collator of the specified strength for the default locale.- Parameters:
strength
- the desired strength- Returns:
- a weak text collator for the given locale and strength
-
getTextCollator
@Nonnull default TextCollator getTextCollator(@Nonnull String locale)
Get a weak text collator for the given locale. In general, this means one that is case- and accent-insensitive.- Parameters:
locale
- the name of the target locale- Returns:
- a weak text collator for the given locale
-
getTextCollator
@Nonnull TextCollator getTextCollator(@Nonnull String locale, int strength)
Get a text collator of the specified strength for the given locale.- Parameters:
locale
- the name of the target localestrength
- the desired strength- Returns:
- a weak text collator for the given locale and strength
-
-