TextElementList
Default mutable implementation of TextElementSequence.
This class wraps an existing List<TextElement> without copying it. All mutations directly affect the underlying list.
The implementation provides optimized search operations and clear semantics for index-based manipulations required by lexical preservation operations.
Since
3.28.0
Functions
Link copied to clipboard
Tests whether all elements in this sequence match the given predicate.
Link copied to clipboard
Tests whether any element in this sequence matches the given predicate.
Link copied to clipboard
Creates a new TextElementList with a copy of the given list.
Link copied to clipboard
Creates an empty mutable TextElementList.
Link copied to clipboard
Finds the first index where the predicate matches, searching forward from index 0.
Link copied to clipboard
Finds the last index where the predicate matches, searching backward from the end.
Link copied to clipboard
Finds the previous index where the predicate matches, searching backward from fromIndex (inclusive).
Link copied to clipboard
Returns the element at the specified index.
Link copied to clipboard
Finds the first occurrence of the specified element.
Finds the next occurrence of element starting from fromIndex (inclusive).
Link copied to clipboard
Inserts element at the specified index.
Link copied to clipboard
Inserts all elements at the specified index.
Link copied to clipboard
Checks if the index is valid (0 <= index
Link copied to clipboard
Returns an iterator starting at the specified index.
Returns an iterator starting at index 0.
Link copied to clipboard
Finds the last occurrence of the specified element.
Finds the previous occurrence of element before fromIndex (inclusive).
Link copied to clipboard
Tests whether no elements in this sequence match the given predicate.
Link copied to clipboard
Creates a new TextElementList containing the given elements.
Creates a new TextElementList wrapping the given list.
Link copied to clipboard
Removes elements in range [fromIndex, toIndex] (inclusive on both ends).
Link copied to clipboard
Returns a stream of elements for functional operations.
Link copied to clipboard
Returns a new list containing elements from the start until the predicate fails.
Link copied to clipboard
Returns an unmodifiable view of the underlying list.
Link copied to clipboard
Returns the underlying mutable list.