public class TextPosition
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
beginColumn |
int |
beginLine |
int |
endColumn |
int |
endLine |
Constructor and Description |
---|
TextPosition()
Build an unknown position (all fields = -1).
|
TextPosition(int line,
int column)
Builds a position whose the end line and column are unknown => a simple position.
|
TextPosition(int beginLine,
int beginColumn,
int endLine,
int endColumn)
Builds a position => a full position (a region in the text).
|
TextPosition(TextPosition positionToCopy)
Builds a copy of the given position.
|
TextPosition(TextPosition startPos,
TextPosition endPos)
Builds a position whose the start is the start position of the first parameter and the end is the end position of the second parameter.
|
TextPosition(Token token)
Builds a position defining the region delimited by the given token.
|
TextPosition(Token beginToken,
Token endToken)
Builds a position => a full position (a region in the text).
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString() |
public final int beginLine
public final int beginColumn
public final int endLine
public final int endColumn
public TextPosition()
public TextPosition(int line, int column)
line
- Begin line.column
- Begin column.public TextPosition(int beginLine, int beginColumn, int endLine, int endColumn)
beginLine
- Begin line.beginColumn
- Begin column.endLine
- End line.endColumn
- End column.public TextPosition(Token token)
token
- The position will be the one of this token.public TextPosition(Token beginToken, Token endToken)
beginToken
- Begin position.endToken
- End position.public TextPosition(TextPosition positionToCopy)
positionToCopy
- Position to copy.public TextPosition(TextPosition startPos, TextPosition endPos)
startPos
- Start position (only beginLine and beginColumn will be used).endPos
- End position (only endLine and endColumn will be used).