The class creates line index map the same way as StringUtils.getLineIndexMap(
Use getIndexMap() to retrieve the line index map.
public | Creates a new instance initialized to receive character data. |
public | LineIndexMapBuilder( Crates a new builder with an estimated number of lines that the result will contain. |
public LineIndexMapBuilder | append( Appends the specified character to this Appendable. |
public LineIndexMapBuilder | append( Appends the specified character sequence to this Appendable. |
public LineIndexMapBuilder | append( Appends a subsequence of the specified character sequence to this
Appendable. |
public LineIndexMapBuilder | append( Appends the argument characters to the index builder. |
public LineIndexMapBuilder | append( Appends a range of characters from a given array to the index builder. |
public int[] | Gets the line index map that was built from the character data passed to this builder. |
The passed line count is an estimate, the build will grow accordingly if more lines are encountered.
Depending on which class implements the character sequence csq, the entire sequence may not be appended. For instance, if csq is a CharBuffer then the subsequence to append is defined by the buffer's position and limit.
An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation
out.append(csq.subSequence(start, end))
this
this
The builder instance is reuseable. The builder is not reset by this call, so appending more data will continue building the same line index.