public static final class RawTextNode.SourceOffsets.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
RawTextNode.SourceOffsets.Builder |
add(int index,
int startLine,
int startCol,
RawTextNode.SourceOffsets.Reason reason) |
RawTextNode.SourceOffsets |
build(int length,
RawTextNode.SourceOffsets.Reason reason)
Builds the
RawTextNode.SourceOffsets. |
RawTextNode.SourceOffsets.Builder |
delete(int from)
Delete all the offsets starting from the
from index. |
int |
endColumn()
Returns the ending column number or
-1 if it hasn't been set yet. |
int |
endLine()
Returns the ending line number or
-1 if it hasn't been set yet. |
boolean |
isEmpty() |
RawTextNode.SourceOffsets.Builder |
setEndLocation(int endLine,
int endCol)
Update the end location only.
|
public RawTextNode.SourceOffsets.Builder add(int index, int startLine, int startCol, RawTextNode.SourceOffsets.Reason reason)
public RawTextNode.SourceOffsets.Builder setEndLocation(int endLine, int endCol)
public RawTextNode.SourceOffsets.Builder delete(int from)
from index.public boolean isEmpty()
public int endLine()
-1 if it hasn't been set yet.public int endColumn()
-1 if it hasn't been set yet.public RawTextNode.SourceOffsets build(int length, RawTextNode.SourceOffsets.Reason reason)
RawTextNode.SourceOffsets.length - the final length of the text.