| java.lang.Object com.ibm.icu.impl.ImplicitCEGenerator
ImplicitCEGenerator | public class ImplicitCEGenerator (Code) | | For generation of Implicit CEs
author: Mark Davis author: Cleaned up so that changes can be made more easily. author: Old values: author: # First Implicit: E26A792D author: # Last Implicit: E3DC70C0 author: # First CJK: E0030300 author: # Last CJK: E0A9DD00 author: # First CJK_A: E0A9DF00 author: # Last CJK_A: E0DE3100 |
Constructor Summary | |
public | ImplicitCEGenerator(int minPrimary, int maxPrimary) | public | ImplicitCEGenerator(int minPrimary, int maxPrimary, int minTrail, int maxTrail, int gap3, int primaries3count) Set up to generate implicits. |
CJK_BASECJK_LIMITCJK_COMPAT_USED_BASECJK_COMPAT_USED_LIMITCJK_A_BASECJK_A_LIMITCJK_B_BASECJK_B_LIMIT | final public static int CJK_BASECJK_LIMITCJK_COMPAT_USED_BASECJK_COMPAT_USED_LIMITCJK_A_BASECJK_A_LIMITCJK_B_BASECJK_B_LIMIT(Code) | | |
DEBUG | final static boolean DEBUG(Code) | | constants
|
MAX_INPUT | final static int MAX_INPUT(Code) | | |
NON_CJK_OFFSET | static int NON_CJK_OFFSET(Code) | | Function used to:
a) collapse the 2 different Han ranges from UCA into one (in the right order), and
b) bump any non-CJK characters by 10FFFF.
The relevant blocks are:
A: 4E00..9FFF; CJK Unified Ideographs
F900..FAFF; CJK Compatibility Ideographs
B: 3400..4DBF; CJK Unified Ideographs Extension A
20000..XX; CJK Unified Ideographs Extension B (and others later on)
As long as
no new B characters are allocated between 4E00 and FAFF, and
no new A characters are outside of this range,
(very high probability) this simple code will work.
The reordered blocks are:
Block1 is CJK
Block2 is CJK_COMPAT_USED
Block3 is CJK_A
(all contiguous)
Any other CJK gets its normal code point
Any non-CJK gets +10FFFF
When we reorder Block1, we make sure that it is at the very start,
so that it will use a 3-byte form.
Warning: the we only pick up the compatibility characters that are
NOT decomposed, so that block is smaller!
|
bottomByte | final static long bottomByte(Code) | | |
final3Count | int final3Count(Code) | | |
final3Multiplier | int final3Multiplier(Code) | | Precomputed by constructor
|
final4Count | int final4Count(Code) | | |
final4Multiplier | int final4Multiplier(Code) | | |
fourBytes | final static long fourBytes(Code) | | |
max4Primary | int max4Primary(Code) | | |
medialCount | int medialCount(Code) | | |
min3Primary | int min3Primary(Code) | | |
min4Boundary | int min4Boundary(Code) | | |
min4Primary | int min4Primary(Code) | | |
topByte | final static long topByte(Code) | | |
ImplicitCEGenerator | public ImplicitCEGenerator(int minPrimary, int maxPrimary)(Code) | | Supply parameters for generating implicit CEs
|
ImplicitCEGenerator | public ImplicitCEGenerator(int minPrimary, int maxPrimary, int minTrail, int maxTrail, int gap3, int primaries3count)(Code) | | Set up to generate implicits.
Parameters: minPrimary - Parameters: maxPrimary - Parameters: minTrail - final byte Parameters: maxTrail - final byte Parameters: gap3 - the gap we leave for tailoring for 3-byte forms Parameters: primaries3count - number of 3-byte primarys we can use (normally 1) |
divideAndRoundUp | public static int divideAndRoundUp(int a, int b)(Code) | | |
getCodePointFromRaw | public int getCodePointFromRaw(int i)(Code) | | |
getGap3 | public int getGap3()(Code) | | |
getGap4 | public int getGap4()(Code) | | |
getImplicitFromCodePoint | public int getImplicitFromCodePoint(int cp)(Code) | | Gets an Implicit from a code point. Internally,
swaps (which produces a raw value 0..220000,
then converts raw to implicit.
Parameters: cp - Primary implicit weight |
getImplicitFromRaw | public int getImplicitFromRaw(int cp)(Code) | | Generate the implicit CE, from raw integer.
Left shifted to put the first byte at the top of an int.
Parameters: cp - code point Primary implicit weight |
getMaxTrail | public int getMaxTrail()(Code) | | Maximal trail value |
getMinTrail | public int getMinTrail()(Code) | | Minimal trail value |
getRawFromCodePoint | public int getRawFromCodePoint(int i)(Code) | | |
getRawFromImplicit | public int getRawFromImplicit(int implicit)(Code) | | Converts implicit CE into raw integer
Parameters: implicit - -1 if illegal format |
swapCJK | static int swapCJK(int i)(Code) | | |
|
|