Class CollationRootElements


  • public final class CollationRootElements
    extends Object
    Container and access methods for collation elements and weights that occur in the root collator. Needed for finding boundaries for building a tailoring. This class takes and returns 16-bit secondary and tertiary weights.
    • Field Detail

      • PRIMARY_SENTINEL

        public static final long PRIMARY_SENTINEL
        Higher than any root primary.
        See Also:
        Constant Field Values
      • SEC_TER_DELTA_FLAG

        public static final int SEC_TER_DELTA_FLAG
        Flag in a root element, set if the element contains secondary & tertiary weights, rather than a primary.
        See Also:
        Constant Field Values
      • PRIMARY_STEP_MASK

        public static final int PRIMARY_STEP_MASK
        Mask for getting the primary range step value from a primary-range-end element.
        See Also:
        Constant Field Values
      • IX_FIRST_TERTIARY_INDEX

        public static final int IX_FIRST_TERTIARY_INDEX
        Index of the first CE with a non-zero tertiary weight. Same as the start of the compact root elements table.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CollationRootElements

        public CollationRootElements​(long[] rootElements)
    • Method Detail

      • getTertiaryBoundary

        public int getTertiaryBoundary()
        Returns the boundary between tertiary weights of primary/secondary CEs and those of tertiary CEs. This is the upper limit for tertiaries of primary/secondary CEs. This minus one is the lower limit for tertiaries of tertiary CEs.
      • getLastCommonSecondary

        public int getLastCommonSecondary()
        Returns the last common secondary weight. This is the lower limit for secondaries of primary CEs.
      • getSecondaryBoundary

        public int getSecondaryBoundary()
        Returns the boundary between secondary weights of primary CEs and those of secondary CEs. This is the upper limit for secondaries of primary CEs. This minus one is the lower limit for secondaries of secondary CEs.