Name: nl37777 Date: 02/27/2002
The class description for java.text.BreakIterator says:
"BreakIterator is intended for use with natural languages only. Do not
use this class to tokenize a programming language."
This seems like an unnecessary limitation. It would be correct to say
that the various get*Instance methods of the class can only return break
iterators for natural languages because they take a Locale argument, and
locales can only specify natural languages. However, there seems to be
no reason why the BreakIterator interface couldn't also be implemented
to provide breaking information for a programming language. Such a break
iterator would be very useful, for example, in the implementation of a
program editor based on the Swing text components.
The class description should be changed to remove this limitation.
======================================================================
###@###.### 11/2/04 18:34 GMT