Package com.ibm.icu.impl.coll
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 CollationData
private CollationData
private String
private UnicodeSet
private StringBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
add
(int c) private void
addContractions
(int c, CharSequence p, int pidx) private void
addPrefix
(CollationData d, CharSequence pfx, int c, int ce32) private void
addPrefixes
(CollationData d, int c, CharSequence p, int pidx) private void
addSuffix
(int c, CharSequence sfx) private void
compare
(int c, int ce32, int baseCE32) private void
compareContractions
(int c, CharSequence p, int pidx, CharSequence q, int qidx) private void
comparePrefixes
(int c, CharSequence p, int pidx, CharSequence q, int qidx) private void
enumTailoredRange
(int start, int end, int ce32, TailoredSet ts) void
private void
handleCE32
(int start, int end, int ce32) private void
private void
setPrefix
(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()
-