Package com.ibm.icu.impl
Interface TrieBuilder.DataManipulate
- All Known Implementing Classes:
PropsVectors.DefaultGetFoldedValue
- Enclosing class:
TrieBuilder
public static interface TrieBuilder.DataManipulate
Character data in com.ibm.impl.Trie have different user-specified format
for different purposes.
This interface specifies methods to be implemented in order for
com.ibm.impl.Trie, to surrogate offset information encapsulated within
the data.
-
Method Summary
Modifier and TypeMethodDescriptionint
getFoldedValue
(int start, int offset) Build-time trie callback function, used with serialize().
-
Method Details
-
getFoldedValue
int getFoldedValue(int start, int offset) 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 invalid input: '<'= start invalid input: '<'= U+10fc00 and (startinvalid input: '&'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- Returns:
- a folded value, or 0 if there is no relevant data for the lead surrogate.
-