| Modifier and Type | Field and Description |
|---|---|
| private long[] | elements
Data structure: See ICU4C source/i18n/collationrootelements.h. |
| pack-priv static final int | IX_COMMON_SEC_AND_TER_CE
Must match Collation.COMMON_SEC_AND_TER_CE. |
| pack-priv static final int | IX_COUNT
The current number of indexes. |
| pack-priv static final int | IX_FIRST_PRIMARY_INDEX
Index of the first CE with a non-zero primary weight. |
| pack-priv static final int | IX_FIRST_SECONDARY_INDEX
Index of the first CE with a non-zero secondary weight. |
| public static final int | IX_FIRST_TERTIARY_INDEX
Index of the first CE with a non-zero tertiary weight. |
| pack-priv static final int | IX_SEC_TER_BOUNDARIES
Secondary & tertiary boundaries. |
| public static final long | PRIMARY_SENTINEL
Higher than any root primary. |
| public static final int | PRIMARY_STEP_MASK
Mask for getting the primary range step value from a primary-range-end element. |
| 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. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| pack-priv int | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| private long | getFirstSecTerForPrimary(int index)
Returns the first secondary & tertiary weights for p where index=findPrimary(p)+1. |
| pack-priv long | |
| public int | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | getPrimaryAfter(long p, int index, boolean isCompressible)
Returns the primary weight after p where index=findPrimary(p). |
| pack-priv long | |
| pack-priv int | getSecondaryAfter(int index, int s)
Returns the secondary weight after [p, s] where index=findPrimary(p) except use index=0 for p=0. |
| pack-priv int | |
| public int | getSecondaryBoundary()
Returns the boundary between secondary weights of primary CEs and those of secondary CEs. |
| pack-priv int | getTertiaryAfter(int index, int s, int t)
Returns the tertiary weight after [p, s, t] where index=findPrimary(p) except use index=0 for p=0. |
| pack-priv int | |
| public int | getTertiaryBoundary()
Returns the boundary between tertiary weights of primary/secondary CEs and those of tertiary CEs. |
| private static boolean | |
| pack-priv long |
| elements | back to summary |
|---|---|
| private long[] elements Data structure: See ICU4C source/i18n/collationrootelements.h. | |
| IX_COMMON_SEC_AND_TER_CE | back to summary |
|---|---|
| pack-priv static final int IX_COMMON_SEC_AND_TER_CE Must match Collation.COMMON_SEC_AND_TER_CE. | |
| IX_COUNT | back to summary |
|---|---|
| pack-priv static final int IX_COUNT The current number of indexes. Currently the same as elements[IX_FIRST_TERTIARY_INDEX]. | |
| IX_FIRST_PRIMARY_INDEX | back to summary |
|---|---|
| pack-priv static final int IX_FIRST_PRIMARY_INDEX Index of the first CE with a non-zero primary weight. | |
| IX_FIRST_SECONDARY_INDEX | back to summary |
|---|---|
| pack-priv static final int IX_FIRST_SECONDARY_INDEX Index of the first CE with a non-zero secondary weight. | |
| IX_FIRST_TERTIARY_INDEX | back to summary |
|---|---|
| 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. | |
| IX_SEC_TER_BOUNDARIES | back to summary |
|---|---|
| pack-priv static final int IX_SEC_TER_BOUNDARIES Secondary & tertiary boundaries. Bits 31..24: [fixed last secondary common byte 45] Bits 23..16: [fixed first ignorable secondary byte 80] Bits 15.. 8: reserved, 0 Bits 7.. 0: [fixed first ignorable tertiary byte 3C] | |
| PRIMARY_SENTINEL | back to summary |
|---|---|
| public static final long PRIMARY_SENTINEL Higher than any root primary. | |
| PRIMARY_STEP_MASK | back to summary |
|---|---|
| public static final int PRIMARY_STEP_MASK Mask for getting the primary range step value from a primary-range-end element. | |
| SEC_TER_DELTA_FLAG | back to summary |
|---|---|
| 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. | |
| CollationRootElements | back to summary |
|---|---|
| public CollationRootElements(long[] rootElements) | |
| findP | back to summary |
|---|---|
| private int findP(long p) Finds the largest index i where elements[i]<=p. Requires first primary<=p<0xffffff00 (PRIMARY_SENTINEL). Does not require that p is a root collator primary. | |
| findPrimary | back to summary |
|---|---|
| pack-priv int findPrimary(long p) Finds the index of the input primary. p must occur as a root primary, and must not be 0. | |
| firstCEWithPrimaryAtLeast | back to summary |
|---|---|
| pack-priv long firstCEWithPrimaryAtLeast(long p) Returns the first root CE with a primary weight of at least p. Intended only for reordering group boundaries. | |
| getFirstPrimary | back to summary |
|---|---|
| pack-priv long getFirstPrimary() Returns the first assigned primary weight. | |
| getFirstPrimaryCE | back to summary |
|---|---|
| pack-priv long getFirstPrimaryCE() Returns the first assigned primary CE. | |
| getFirstSecondaryCE | back to summary |
|---|---|
| pack-priv long getFirstSecondaryCE() Returns the first assigned secondary CE. | |
| getFirstSecTerForPrimary | back to summary |
|---|---|
| private long getFirstSecTerForPrimary(int index) Returns the first secondary & tertiary weights for p where index=findPrimary(p)+1. | |
| getFirstTertiaryCE | back to summary |
|---|---|
| pack-priv long getFirstTertiaryCE() Returns the first assigned tertiary CE. | |
| getLastCommonSecondary | back to summary |
|---|---|
| public int getLastCommonSecondary() Returns the last common secondary weight. This is the lower limit for secondaries of primary CEs. | |
| getLastSecondaryCE | back to summary |
|---|---|
| pack-priv long getLastSecondaryCE() Returns the last assigned secondary CE. | |
| getLastTertiaryCE | back to summary |
|---|---|
| pack-priv long getLastTertiaryCE() Returns the last assigned tertiary CE. | |
| getPrimaryAfter | back to summary |
|---|---|
| pack-priv long getPrimaryAfter(long p, int index, boolean isCompressible) Returns the primary weight after p where index=findPrimary(p). p must be at least the first root primary. | |
| getPrimaryBefore | back to summary |
|---|---|
| pack-priv long getPrimaryBefore(long p, boolean isCompressible) Returns the primary weight before p. p must be greater than the first root primary. | |
| getSecondaryAfter | back to summary |
|---|---|
| pack-priv int getSecondaryAfter(int index, int s) Returns the secondary weight after [p, s] where index=findPrimary(p) except use index=0 for p=0. Must return a weight for every root [p, s] as well as for every weight returned by getSecondaryBefore(). If p!=0 then s can be BEFORE_WEIGHT16. Exception: [0, 0] is handled by the CollationBuilder: Both its lower and upper boundaries are special. | |
| getSecondaryBefore | back to summary |
|---|---|
| pack-priv int getSecondaryBefore(long p, int s) Returns the secondary weight before [p, s]. | |
| getSecondaryBoundary | back to summary |
|---|---|
| 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. | |
| getTertiaryAfter | back to summary |
|---|---|
| pack-priv int getTertiaryAfter(int index, int s, int t) Returns the tertiary weight after [p, s, t] where index=findPrimary(p) except use index=0 for p=0. Must return a weight for every root [p, s, t] as well as for every weight returned by getTertiaryBefore(). If s!=0 then t can be BEFORE_WEIGHT16. Exception: [0, 0, 0] is handled by the CollationBuilder: Both its lower and upper boundaries are special. | |
| getTertiaryBefore | back to summary |
|---|---|
| pack-priv int getTertiaryBefore(long p, int s, int t) Returns the tertiary weight before [p, s, t]. | |
| getTertiaryBoundary | back to summary |
|---|---|
| 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. | |
| isEndOfPrimaryRange | back to summary |
|---|---|
| private static boolean isEndOfPrimaryRange(long q) | |
| lastCEWithPrimaryBefore | back to summary |
|---|---|
| pack-priv long lastCEWithPrimaryBefore(long p) Returns the last root CE with a primary weight before p. Intended only for reordering group boundaries. | |