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
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
- duplicates
-
JDK-4430652 [Col] CollationElementIterator constructors are package access
-
- Closed
-
- relates to
-
JDK-6486695 [Col] Doc: CollationElementIterator example assumes Collator.getInstance return type
-
- Closed
-