Package com.ibm.icu.impl.coll
Class Collation
- java.lang.Object
-
- com.ibm.icu.impl.coll.Collation
-
public final class Collation extends Object
Collation v2 basic definitions and static helper functions. Data structures except for expansion tables store 32-bit CEs which are either specials (see tags below) or are compact forms of 64-bit CEs.
-
-
Field Summary
Fields Modifier and Type Field Description static intCASE_AND_QUATERNARY_MASKCase bits and quaternary bits.static intCASE_LEVELstatic intCASE_MASKstatic intCOMMON_SEC_AND_TER_CELower 32 bits of a CE with common secondary and tertiary weights.static intCOMMON_WEIGHT16static intEQUALstatic longFFFD_PRIMARYstatic intGREATERstatic intIDENTICAL_LEVELstatic intLESSstatic intLEVEL_SEPARATOR_BYTEstatic longMAX_PRIMARYstatic intMERGE_SEPARATOR_BYTEMerge-sort-key separator.static longMERGE_SEPARATOR_PRIMARYstatic longNO_CEstatic intNO_LEVELUnspecified level.static intONLY_TERTIARY_MASKOnly the 2*6 bits for the pure tertiary weight.static intPRIMARY_COMPRESSION_HIGH_BYTEPrimary compression high terminator.static intPRIMARY_COMPRESSION_LOW_BYTEPrimary compression low terminator, must be greater than MERGE_SEPARATOR_BYTE.static intPRIMARY_LEVELstatic intQUATERNARY_LEVELstatic intQUATERNARY_MASKstatic intSECONDARY_LEVELstatic intSENTINEL_CPUChar32 U_SENTINEL.static intTERMINATOR_BYTEstatic intTERTIARY_LEVELstatic intZERO_LEVELBeyond sort key bytes.
-
Constructor Summary
Constructors Constructor Description Collation()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longincThreeBytePrimaryByOffset(long basePrimary, boolean isCompressible, int offset)Increments a 3-byte primary by a code point offset.static longincTwoBytePrimaryByOffset(long basePrimary, boolean isCompressible, int offset)Increments a 2-byte primary by a code point offset.static longmakeCE(long p)Creates a CE from a primary weight.
-
-
-
Field Detail
-
SENTINEL_CP
public static final int SENTINEL_CP
UChar32 U_SENTINEL. TODO: Create a common, public constant?- See Also:
- Constant Field Values
-
LESS
public static final int LESS
- See Also:
- Constant Field Values
-
EQUAL
public static final int EQUAL
- See Also:
- Constant Field Values
-
GREATER
public static final int GREATER
- See Also:
- Constant Field Values
-
TERMINATOR_BYTE
public static final int TERMINATOR_BYTE
- See Also:
- Constant Field Values
-
LEVEL_SEPARATOR_BYTE
public static final int LEVEL_SEPARATOR_BYTE
- See Also:
- Constant Field Values
-
MERGE_SEPARATOR_BYTE
public static final int MERGE_SEPARATOR_BYTE
Merge-sort-key separator. Same as the unique primary and identical-level weights of U+FFFE. Must not be used as primary compression low terminator. Otherwise usable.- See Also:
- Constant Field Values
-
MERGE_SEPARATOR_PRIMARY
public static final long MERGE_SEPARATOR_PRIMARY
- See Also:
- Constant Field Values
-
PRIMARY_COMPRESSION_LOW_BYTE
public static final int PRIMARY_COMPRESSION_LOW_BYTE
Primary compression low terminator, must be greater than MERGE_SEPARATOR_BYTE. Reserved value in primary second byte if the lead byte is compressible. Otherwise usable in all CE weight bytes.- See Also:
- Constant Field Values
-
PRIMARY_COMPRESSION_HIGH_BYTE
public static final int PRIMARY_COMPRESSION_HIGH_BYTE
Primary compression high terminator. Reserved value in primary second byte if the lead byte is compressible. Otherwise usable in all CE weight bytes.- See Also:
- Constant Field Values
-
COMMON_WEIGHT16
public static final int COMMON_WEIGHT16
- See Also:
- Constant Field Values
-
COMMON_SEC_AND_TER_CE
public static final int COMMON_SEC_AND_TER_CE
Lower 32 bits of a CE with common secondary and tertiary weights.- See Also:
- Constant Field Values
-
CASE_MASK
public static final int CASE_MASK
- See Also:
- Constant Field Values
-
ONLY_TERTIARY_MASK
public static final int ONLY_TERTIARY_MASK
Only the 2*6 bits for the pure tertiary weight.- See Also:
- Constant Field Values
-
QUATERNARY_MASK
public static final int QUATERNARY_MASK
- See Also:
- Constant Field Values
-
CASE_AND_QUATERNARY_MASK
public static final int CASE_AND_QUATERNARY_MASK
Case bits and quaternary bits.- See Also:
- Constant Field Values
-
MAX_PRIMARY
public static final long MAX_PRIMARY
- See Also:
- Constant Field Values
-
FFFD_PRIMARY
public static final long FFFD_PRIMARY
- See Also:
- Constant Field Values
-
NO_CE
public static final long NO_CE
- See Also:
- Constant Field Values
-
NO_LEVEL
public static final int NO_LEVEL
Unspecified level.- See Also:
- Constant Field Values
-
PRIMARY_LEVEL
public static final int PRIMARY_LEVEL
- See Also:
- Constant Field Values
-
SECONDARY_LEVEL
public static final int SECONDARY_LEVEL
- See Also:
- Constant Field Values
-
CASE_LEVEL
public static final int CASE_LEVEL
- See Also:
- Constant Field Values
-
TERTIARY_LEVEL
public static final int TERTIARY_LEVEL
- See Also:
- Constant Field Values
-
QUATERNARY_LEVEL
public static final int QUATERNARY_LEVEL
- See Also:
- Constant Field Values
-
IDENTICAL_LEVEL
public static final int IDENTICAL_LEVEL
- See Also:
- Constant Field Values
-
ZERO_LEVEL
public static final int ZERO_LEVEL
Beyond sort key bytes.- See Also:
- Constant Field Values
-
-
Method Detail
-
makeCE
public static long makeCE(long p)
Creates a CE from a primary weight.
-
incTwoBytePrimaryByOffset
public static long incTwoBytePrimaryByOffset(long basePrimary, boolean isCompressible, int offset)Increments a 2-byte primary by a code point offset.
-
incThreeBytePrimaryByOffset
public static long incThreeBytePrimaryByOffset(long basePrimary, boolean isCompressible, int offset)Increments a 3-byte primary by a code point offset.
-
-