Class TailoredSet


  • public final class TailoredSet
    extends java.lang.Object
    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 Detail

      • unreversedPrefix

        private java.lang.StringBuilder unreversedPrefix
      • suffix

        private java.lang.String suffix
    • Constructor Detail

      • TailoredSet

        public TailoredSet​(UnicodeSet t)
    • Method Detail

      • enumTailoredRange

        private void enumTailoredRange​(int start,
                                       int end,
                                       int ce32,
                                       TailoredSet ts)
      • handleCE32

        private void handleCE32​(int start,
                                int end,
                                int ce32)
      • compare

        private void compare​(int c,
                             int ce32,
                             int baseCE32)
      • comparePrefixes

        private void comparePrefixes​(int c,
                                     java.lang.CharSequence p,
                                     int pidx,
                                     java.lang.CharSequence q,
                                     int qidx)
      • compareContractions

        private void compareContractions​(int c,
                                         java.lang.CharSequence p,
                                         int pidx,
                                         java.lang.CharSequence q,
                                         int qidx)
      • addPrefixes

        private void addPrefixes​(CollationData d,
                                 int c,
                                 java.lang.CharSequence p,
                                 int pidx)
      • addPrefix

        private void addPrefix​(CollationData d,
                               java.lang.CharSequence pfx,
                               int c,
                               int ce32)
      • addContractions

        private void addContractions​(int c,
                                     java.lang.CharSequence p,
                                     int pidx)
      • addSuffix

        private void addSuffix​(int c,
                               java.lang.CharSequence sfx)
      • add

        private void add​(int c)
      • setPrefix

        private void setPrefix​(java.lang.CharSequence pfx)
      • resetPrefix

        private void resetPrefix()