Class TailoredSet
java.lang.Object
com.ibm.icu.impl.coll.TailoredSet
Finds the set of characters and strings that sort differently in the tailoring
from the base data.
Every mapping in the tailoring needs to be compared to the base,
because some mappings are copied for optimization, and
all contractions for a character are copied if any contractions for that character
are added, modified or removed.
It might be simpler to re-parse the rule string, but:
- That would require duplicating some of the from-rules builder code.
- That would make the runtime code depend on the builder.
- That would only work if we have the rule string, and we allow users to
omit the rule string from data files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CollationDataprivate CollationDataprivate Stringprivate UnicodeSetprivate StringBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidadd(int c) private voidaddContractions(int c, CharSequence p, int pidx) private voidaddPrefix(CollationData d, CharSequence pfx, int c, int ce32) private voidaddPrefixes(CollationData d, int c, CharSequence p, int pidx) private voidaddSuffix(int c, CharSequence sfx) private voidcompare(int c, int ce32, int baseCE32) private voidcompareContractions(int c, CharSequence p, int pidx, CharSequence q, int qidx) private voidcomparePrefixes(int c, CharSequence p, int pidx, CharSequence q, int qidx) private voidenumTailoredRange(int start, int end, int ce32, TailoredSet ts) voidprivate voidhandleCE32(int start, int end, int ce32) private voidprivate voidsetPrefix(CharSequence pfx)
-
Field Details
-
data
-
baseData
-
tailored
-
unreversedPrefix
-
suffix
-
-
Constructor Details
-
TailoredSet
-
-
Method Details
-
forData
-
enumTailoredRange
-
handleCE32
private void handleCE32(int start, int end, int ce32) -
compare
private void compare(int c, int ce32, int baseCE32) -
comparePrefixes
-
compareContractions
-
addPrefixes
-
addPrefix
-
addContractions
-
addSuffix
-
add
private void add(int c) -
setPrefix
-
resetPrefix
private void resetPrefix()
-