Package com.ibm.icu.impl.coll
Class CollationData
- java.lang.Object
-
- com.ibm.icu.impl.coll.CollationData
-
public final class CollationData extends Object
Collation data container. Immutable data created by a CollationDataBuilder, or loaded from a file, or deserialized from API-provided binary data. Includes data for the collation base (root/default), aliased if this is not the base.
-
-
Field Summary
Fields Modifier and Type Field Description CollationDatabaseBase collation data, or null if this data itself is a base.boolean[]compressibleBytes256 flags for which primary-weight lead bytes are compressible.char[]fastLatinTableFast Latin table for common-Latin-text string comparisons.Normalizer2ImplnfcImpllong[]rootElementsCollation elements in the root collator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCE32(int c)int[]getEquivalentScripts(int script)intgetGroupForPrimary(long p)Finds the reordering group which contains the primary weight.longgetLastPrimaryForGroup(int script)Returns the last primary for the script's reordering group.booleanisCompressibleLeadByte(int b)booleanisCompressiblePrimary(long p)booleanisUnsafeBackward(int c, boolean numeric)
-
-
-
Field Detail
-
base
public CollationData base
Base collation data, or null if this data itself is a base.
-
nfcImpl
public Normalizer2Impl nfcImpl
-
compressibleBytes
public boolean[] compressibleBytes
256 flags for which primary-weight lead bytes are compressible.
-
fastLatinTable
public char[] fastLatinTable
Fast Latin table for common-Latin-text string comparisons. Data structure see class CollationFastLatin.
-
rootElements
public long[] rootElements
Collation elements in the root collator. Used by the CollationRootElements class. The data structure is described there. null in a tailoring.
-
-
Method Detail
-
getCE32
public int getCE32(int c)
-
isUnsafeBackward
public boolean isUnsafeBackward(int c, boolean numeric)
-
isCompressibleLeadByte
public boolean isCompressibleLeadByte(int b)
-
isCompressiblePrimary
public boolean isCompressiblePrimary(long p)
-
getLastPrimaryForGroup
public long getLastPrimaryForGroup(int script)
Returns the last primary for the script's reordering group.- Returns:
- the last primary of the group (not an actual root collator primary weight), or 0 if the script is unknown
-
getGroupForPrimary
public int getGroupForPrimary(long p)
Finds the reordering group which contains the primary weight.- Returns:
- the first script of the group, or -1 if the weight is beyond the last group
-
getEquivalentScripts
public int[] getEquivalentScripts(int script)
-
-