Class NaturalSortKeyBuilder


  • public final class NaturalSortKeyBuilder
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int FORMAT_VERSION
      Version of the binary key format.
    • Constructor Summary

      Constructors 
      Constructor Description
      NaturalSortKeyBuilder()
      Creates a builder using the collation order shared by fr-FR and en under CLDR.
      NaturalSortKeyBuilder​(java.util.Locale locale)
      Creates a builder for an explicit collation locale.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] build​(java.lang.String strValue)
      Builds the sort key for a value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FORMAT_VERSION

        public static final int FORMAT_VERSION
        Version of the binary key format. Bump on any change to build(String) : previously indexed keys are then no longer comparable with newly produced ones and a full reindexation is required.
        See Also:
        Constant Field Values
    • Constructor Detail

      • NaturalSortKeyBuilder

        public NaturalSortKeyBuilder()
        Creates a builder using the collation order shared by fr-FR and en under CLDR.
      • NaturalSortKeyBuilder

        public NaturalSortKeyBuilder​(java.util.Locale locale)
        Creates a builder for an explicit collation locale.
        Parameters:
        locale - the collation locale, null meaning Locale.ENGLISH
    • Method Detail

      • build

        public byte[] build​(java.lang.String strValue)
        Builds the sort key for a value.
        Parameters:
        strValue - the raw response value, may be null
        Returns:
        the binary sort key, never null ; empty for a null or empty input