Class LocalizedSegmenter

  • All Implemented Interfaces:
    Segmenter

    public class LocalizedSegmenter
    extends Object
    implements Segmenter
    Performs segmentation according to the rules defined for the locale.
    Status:
    Draft ICU 78.
    • Method Detail

      • segment

        public Segments segment​(CharSequence s)
        Returns a Segments object that encapsulates the segmentation of the input CharSequence. The Segments object, in turn, provides the main APIs to support traversal over the resulting segments and boundaries via the Java Stream abstraction.
        Specified by:
        segment in interface Segmenter
        Parameters:
        s - input CharSequence on which segmentation is performed. The input must not be modified while using the resulting Segments object.
        Returns:
        A Segments object with APIs to access the results of segmentation, including APIs that return Streams of the segments and boundaries.
        Status:
        Draft ICU 78.
      • builder

        public static LocalizedSegmenter.Builder builder()
        Returns:
        a builder for constructing LocalizedSegmenter
        Status:
        Draft ICU 78.