Interface RichTextRuns

All Superinterfaces:
Iterable<Run>
All Known Implementing Classes:
RichText, RichTextBuilder, RichTextBuilderExtBase, RichTextBuilderFx

public interface RichTextRuns extends Iterable<Run>
Represents a collection of rich text runs within a text unit. A rich text run consists of a sequence of characters with the same styling or formatting attributes.

- This interface provides methods to access and interact with the runs, allowing retrieval of individual runs, access to all runs as a stream, and checking if the collection is empty.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the collection of rich text runs is empty.
    Retrieves a list of rich text runs.
    Provides a Stream of Run objects in the collection.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • runs

      List<Run> runs()
      Retrieves a list of rich text runs. Each run represents a sequence of characters sharing the same styling or formatting attributes.
      Returns:
      a list of Run objects, where each object represents a block of text with shared attributes
    • runStream

      Stream<Run> runStream()
      Provides a Stream of Run objects in the collection. This method is useful for processing the runs in a functional programming style or applying bulk operations such as filtering, mapping, or reducing.
      Returns:
      a Stream of Run objects representing the rich text runs in the collection
    • isEmpty

      boolean isEmpty()
      Checks if the collection of rich text runs is empty.
      Returns:
      true if there are no rich text runs in the collection; false otherwise