JDK-8212787 : Stream support for BreakIterator
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.text
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2018-10-22
  • Updated: 2022-08-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
The current BreakIterator only has the iterator operation, based on its index. It would be useful if it supports stream, such that,

Stream<String> BreakIterator.graphemes(String);
Stream<String> BreakIterator.words(String);
Stream<String> BreakIterator.sentences(String);
Stream<String> BreakIterator.lines(String); 

Would return stream of string, instead of iterating over the text with the index. This is in addition to the existing iterator operation.
Comments
Or rather, ``` Stream<String> stream() ``` would just suffice.
10-08-2022