Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4146307

[Col] RFE: API: CollationElementIterator should allow subclassing

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • None
    • 1.2.0, 1.3.0
    • core-libs
    • None
    • generic, x86
    • generic, windows_98

      Name: bb33257 Date: 06/05/98


      While trying to implement a Collator for Thai, I've discovered a
      major hole in the collation API: you can't subclass CollationElementIterator.

      Thai and other Southeast Asian languages have collation sequences
      that are rule-based, except that certain vowel/consonant pairs
      need to be swapped before applying the rules. The natural place
      to do this reordering is inside a custom CollationElementIterator
      subclass, or alternatively inside a custom CharacterIterator class.

      Unfortuately, neither of these approaches is possible. You just
      plain can't subclass CollationElementIterator, so the first approach
      is out. And since CollationElementIterator is the object that
      creates the character iterators used in collation, there's no way
      to hook into the process and get your own CharacterIterator used
      either.

      We need to make CollationElementIterator non-final and make its
      two constructors protected instead of package-visible.
      ======================================================================
      ###@###.### 11/2/04 18:19 GMT

            naoto Naoto Sato
            bcbeck Brian Beck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: