Package adql.query
Class TextPosition
java.lang.Object
adql.query.TextPosition
Indicates a simple position or a token/string position in a text.
It is particularly used to localize columns and tables in the original ADQL query.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
final int
final int
final int
-
Constructor Summary
ConstructorsConstructorDescriptionBuild 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
(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).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. -
Method Summary
-
Field Details
-
beginLine
public final int beginLine -
beginColumn
public final int beginColumn -
endLine
public final int endLine -
endColumn
public final int endColumn
-
-
Constructor Details
-
TextPosition
public TextPosition()Build an unknown position (all fields = -1). -
TextPosition
public TextPosition(int line, int column) Builds a position whose the end line and column are unknown => a simple position.- Parameters:
line
- Begin line.column
- Begin column.
-
TextPosition
public TextPosition(int beginLine, int beginColumn, int endLine, int endColumn) Builds a position => a full position (a region in the text).- Parameters:
beginLine
- Begin line.beginColumn
- Begin column.endLine
- End line.endColumn
- End column.
-
TextPosition
Builds a position defining the region delimited by the given token.- Parameters:
token
- The position will be the one of this token.
-
TextPosition
Builds a position => a full position (a region in the text).- Parameters:
beginToken
- Begin position.endToken
- End position.
-
TextPosition
Builds a copy of the given position.- Parameters:
positionToCopy
- Position to copy.- Since:
- 1.4
-
TextPosition
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.- Parameters:
startPos
- Start position (only beginLine and beginColumn will be used).endPos
- End position (only endLine and endColumn will be used).- Since:
- 1.4
-
-
Method Details