Class TextCollatorRegistryJRE
- java.lang.Object
-
- com.apple.foundationdb.record.provider.common.text.TextCollatorRegistryJRE
-
- All Implemented Interfaces:
TextCollatorRegistry
@API(EXPERIMENTAL) public class TextCollatorRegistryJRE extends Object implements TextCollatorRegistry
A text collator registry using the Java Platform's ownCollator
implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TextCollatorRegistryJRE.TextCollatorJRE
-
Field Summary
Fields Modifier and Type Field Description static TextCollatorRegistryJRE
INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TextCollator
getTextCollator(int strength)
Get a text collator of the specified strength for the default locale.TextCollator
getTextCollator(String locale, int strength)
Get a text collator of the specified strength for the given locale.static TextCollatorRegistry
instance()
Get the singleton instance of this registry.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.record.provider.common.text.TextCollatorRegistry
getTextCollator, getTextCollator
-
-
-
-
Field Detail
-
INSTANCE
public static final TextCollatorRegistryJRE INSTANCE
-
-
Method Detail
-
instance
public static TextCollatorRegistry instance()
Get the singleton instance of this registry.- Returns:
- the text collator registry that used JRE classes.
-
getTextCollator
@Nonnull public TextCollator getTextCollator(int strength)
Description copied from interface:TextCollatorRegistry
Get a text collator of the specified strength for the default locale.- Specified by:
getTextCollator
in interfaceTextCollatorRegistry
- Parameters:
strength
- the desired strength- Returns:
- a weak text collator for the given locale and strength
-
getTextCollator
@Nonnull public TextCollator getTextCollator(@Nonnull String locale, int strength)
Description copied from interface:TextCollatorRegistry
Get a text collator of the specified strength for the given locale.- Specified by:
getTextCollator
in interfaceTextCollatorRegistry
- Parameters:
locale
- the name of the target localestrength
- the desired strength- Returns:
- a weak text collator for the given locale and strength
-
-