Package com.dua3.utility.text
Interface RichTextRuns
- All Known Implementing Classes:
RichText,RichTextBuilder,RichTextBuilderExtBase,RichTextBuilderFx
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
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
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
Runobjects, where each object represents a block of text with shared attributes
-
runStream
Provides aStreamofRunobjects 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
StreamofRunobjects 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
-