Class CollationData


  • public final class CollationData
    extends Object
    Collation data container. Immutable data created by a CollationDataBuilder, or loaded from a file, or deserialized from API-provided binary data. Includes data for the collation base (root/default), aliased if this is not the base.
    • Field Detail

      • base

        public CollationData base
        Base collation data, or null if this data itself is a base.
      • compressibleBytes

        public boolean[] compressibleBytes
        256 flags for which primary-weight lead bytes are compressible.
      • fastLatinTable

        public char[] fastLatinTable
        Fast Latin table for common-Latin-text string comparisons. Data structure see class CollationFastLatin.
      • rootElements

        public long[] rootElements
        Collation elements in the root collator. Used by the CollationRootElements class. The data structure is described there. null in a tailoring.
    • Method Detail

      • getCE32

        public int getCE32​(int c)
      • isUnsafeBackward

        public boolean isUnsafeBackward​(int c,
                                        boolean numeric)
      • isCompressibleLeadByte

        public boolean isCompressibleLeadByte​(int b)
      • isCompressiblePrimary

        public boolean isCompressiblePrimary​(long p)
      • getLastPrimaryForGroup

        public long getLastPrimaryForGroup​(int script)
        Returns the last primary for the script's reordering group.
        Returns:
        the last primary of the group (not an actual root collator primary weight), or 0 if the script is unknown
      • getGroupForPrimary

        public int getGroupForPrimary​(long p)
        Finds the reordering group which contains the primary weight.
        Returns:
        the first script of the group, or -1 if the weight is beyond the last group
      • getEquivalentScripts

        public int[] getEquivalentScripts​(int script)