Class PropsVectors.DefaultGetFoldedValue

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getFoldedValue​(int start, int offset)
      Build-time trie callback function, used with serialize().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultGetFoldedValue

        public DefaultGetFoldedValue​(IntTrieBuilder inBuilder)
    • Method Detail

      • getFoldedValue

        public int getFoldedValue​(int start,
                                  int offset)
        Description copied from interface: TrieBuilder.DataManipulate
        Build-time trie callback function, used with serialize(). This function calculates a lead surrogate's value including a folding offset from the 1024 supplementary code points [start..start+1024[ . It is U+10000 <= start <= U+10fc00 and (start&0x3ff)==0. The folding offset is provided by the caller. It is offset=UTRIE_BMP_INDEX_LENGTH+n*UTRIE_SURROGATE_BLOCK_COUNT with n=0..1023. Instead of the offset itself, n can be stored in 10 bits - or fewer if it can be assumed that few lead surrogates have associated data. The returned value must be - not zero if and only if there is relevant data for the corresponding 1024 supplementary code points - such that UTrie.getFoldingOffset(UNewTrieGetFoldedValue(..., offset))==offset
        Specified by:
        getFoldedValue in interface TrieBuilder.DataManipulate
        Returns:
        a folded value, or 0 if there is no relevant data for the lead surrogate.