TokenProcessor (int startIndex, @NotNull SegmentArrayWithData segments, @NotNull CharSequence myText) { return (tokenIndex, startOffset, endOffset, data, tokenType) -> segments.setElementAt(tokenIndex, startOffset, endOffset, data); }