Package com.ibm.icu.impl.coll
Class CollationKeys
- java.lang.Object
-
- com.ibm.icu.impl.coll.CollationKeys
-
public final class CollationKeys extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CollationKeys.LevelCallback
static class
CollationKeys.SortKeyByteSink
private static class
CollationKeys.SortKeyLevel
-
Field Summary
Fields Modifier and Type Field Description private static int
CASE_LOWER_FIRST_COMMON_HIGH
private static int
CASE_LOWER_FIRST_COMMON_LOW
private static int
CASE_LOWER_FIRST_COMMON_MAX_COUNT
private static int
CASE_LOWER_FIRST_COMMON_MIDDLE
private static int
CASE_UPPER_FIRST_COMMON_HIGH
private static int
CASE_UPPER_FIRST_COMMON_LOW
private static int
CASE_UPPER_FIRST_COMMON_MAX_COUNT
private static int[]
levelMasks
Map from collation strength (UColAttributeValue) to a mask of Collation.Level bits up to that strength, excluding the CASE_LEVEL which is independent of the strength, and excluding IDENTICAL_LEVEL which this function does not write.private static int
QUAT_COMMON_HIGH
private static int
QUAT_COMMON_LOW
private static int
QUAT_COMMON_MAX_COUNT
private static int
QUAT_COMMON_MIDDLE
private static int
QUAT_SHIFTED_LIMIT_BYTE
(package private) static int
SEC_COMMON_HIGH
private static int
SEC_COMMON_LOW
private static int
SEC_COMMON_MAX_COUNT
private static int
SEC_COMMON_MIDDLE
static CollationKeys.LevelCallback
SIMPLE_LEVEL_FALLBACK
private static int
TER_LOWER_FIRST_COMMON_HIGH
private static int
TER_LOWER_FIRST_COMMON_LOW
private static int
TER_LOWER_FIRST_COMMON_MAX_COUNT
private static int
TER_LOWER_FIRST_COMMON_MIDDLE
private static int
TER_ONLY_COMMON_HIGH
private static int
TER_ONLY_COMMON_LOW
private static int
TER_ONLY_COMMON_MAX_COUNT
private static int
TER_ONLY_COMMON_MIDDLE
private static int
TER_UPPER_FIRST_COMMON_HIGH
private static int
TER_UPPER_FIRST_COMMON_LOW
private static int
TER_UPPER_FIRST_COMMON_MAX_COUNT
private static int
TER_UPPER_FIRST_COMMON_MIDDLE
-
Constructor Summary
Constructors Modifier Constructor Description private
CollationKeys()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static CollationKeys.SortKeyLevel
getSortKeyLevel(int levels, int level)
static void
writeSortKeyUpToQuaternary(CollationIterator iter, boolean[] compressibleBytes, CollationSettings settings, CollationKeys.SortKeyByteSink sink, int minLevel, CollationKeys.LevelCallback callback, boolean preflight)
Writes the sort key bytes for minLevel up to the iterator data's strength.
-
-
-
Field Detail
-
SIMPLE_LEVEL_FALLBACK
public static final CollationKeys.LevelCallback SIMPLE_LEVEL_FALLBACK
-
SEC_COMMON_LOW
private static final int SEC_COMMON_LOW
- See Also:
- Constant Field Values
-
SEC_COMMON_MIDDLE
private static final int SEC_COMMON_MIDDLE
- See Also:
- Constant Field Values
-
SEC_COMMON_HIGH
static final int SEC_COMMON_HIGH
- See Also:
- Constant Field Values
-
SEC_COMMON_MAX_COUNT
private static final int SEC_COMMON_MAX_COUNT
- See Also:
- Constant Field Values
-
CASE_LOWER_FIRST_COMMON_LOW
private static final int CASE_LOWER_FIRST_COMMON_LOW
- See Also:
- Constant Field Values
-
CASE_LOWER_FIRST_COMMON_MIDDLE
private static final int CASE_LOWER_FIRST_COMMON_MIDDLE
- See Also:
- Constant Field Values
-
CASE_LOWER_FIRST_COMMON_HIGH
private static final int CASE_LOWER_FIRST_COMMON_HIGH
- See Also:
- Constant Field Values
-
CASE_LOWER_FIRST_COMMON_MAX_COUNT
private static final int CASE_LOWER_FIRST_COMMON_MAX_COUNT
- See Also:
- Constant Field Values
-
CASE_UPPER_FIRST_COMMON_LOW
private static final int CASE_UPPER_FIRST_COMMON_LOW
- See Also:
- Constant Field Values
-
CASE_UPPER_FIRST_COMMON_HIGH
private static final int CASE_UPPER_FIRST_COMMON_HIGH
- See Also:
- Constant Field Values
-
CASE_UPPER_FIRST_COMMON_MAX_COUNT
private static final int CASE_UPPER_FIRST_COMMON_MAX_COUNT
- See Also:
- Constant Field Values
-
TER_ONLY_COMMON_LOW
private static final int TER_ONLY_COMMON_LOW
- See Also:
- Constant Field Values
-
TER_ONLY_COMMON_MIDDLE
private static final int TER_ONLY_COMMON_MIDDLE
- See Also:
- Constant Field Values
-
TER_ONLY_COMMON_HIGH
private static final int TER_ONLY_COMMON_HIGH
- See Also:
- Constant Field Values
-
TER_ONLY_COMMON_MAX_COUNT
private static final int TER_ONLY_COMMON_MAX_COUNT
- See Also:
- Constant Field Values
-
TER_LOWER_FIRST_COMMON_LOW
private static final int TER_LOWER_FIRST_COMMON_LOW
- See Also:
- Constant Field Values
-
TER_LOWER_FIRST_COMMON_MIDDLE
private static final int TER_LOWER_FIRST_COMMON_MIDDLE
- See Also:
- Constant Field Values
-
TER_LOWER_FIRST_COMMON_HIGH
private static final int TER_LOWER_FIRST_COMMON_HIGH
- See Also:
- Constant Field Values
-
TER_LOWER_FIRST_COMMON_MAX_COUNT
private static final int TER_LOWER_FIRST_COMMON_MAX_COUNT
- See Also:
- Constant Field Values
-
TER_UPPER_FIRST_COMMON_LOW
private static final int TER_UPPER_FIRST_COMMON_LOW
- See Also:
- Constant Field Values
-
TER_UPPER_FIRST_COMMON_MIDDLE
private static final int TER_UPPER_FIRST_COMMON_MIDDLE
- See Also:
- Constant Field Values
-
TER_UPPER_FIRST_COMMON_HIGH
private static final int TER_UPPER_FIRST_COMMON_HIGH
- See Also:
- Constant Field Values
-
TER_UPPER_FIRST_COMMON_MAX_COUNT
private static final int TER_UPPER_FIRST_COMMON_MAX_COUNT
- See Also:
- Constant Field Values
-
QUAT_COMMON_LOW
private static final int QUAT_COMMON_LOW
- See Also:
- Constant Field Values
-
QUAT_COMMON_MIDDLE
private static final int QUAT_COMMON_MIDDLE
- See Also:
- Constant Field Values
-
QUAT_COMMON_HIGH
private static final int QUAT_COMMON_HIGH
- See Also:
- Constant Field Values
-
QUAT_COMMON_MAX_COUNT
private static final int QUAT_COMMON_MAX_COUNT
- See Also:
- Constant Field Values
-
QUAT_SHIFTED_LIMIT_BYTE
private static final int QUAT_SHIFTED_LIMIT_BYTE
- See Also:
- Constant Field Values
-
levelMasks
private static final int[] levelMasks
Map from collation strength (UColAttributeValue) to a mask of Collation.Level bits up to that strength, excluding the CASE_LEVEL which is independent of the strength, and excluding IDENTICAL_LEVEL which this function does not write.
-
-
Method Detail
-
getSortKeyLevel
private static CollationKeys.SortKeyLevel getSortKeyLevel(int levels, int level)
-
writeSortKeyUpToQuaternary
public static void writeSortKeyUpToQuaternary(CollationIterator iter, boolean[] compressibleBytes, CollationSettings settings, CollationKeys.SortKeyByteSink sink, int minLevel, CollationKeys.LevelCallback callback, boolean preflight)
Writes the sort key bytes for minLevel up to the iterator data's strength. Optionally writes the case level. Stops writing levels when callback.needToWrite(level) returns false. Separates levels with the LEVEL_SEPARATOR_BYTE but does not write a TERMINATOR_BYTE.
-
-