-
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type |
Method |
Description |
long |
getColumnNumber(long pos) |
Finds the column for a character position.
|
long |
getLineNumber(long pos) |
Finds the line containing a position; a line termination
character is on the line it terminates.
|
long |
getPosition(long line,
long column) |
Finds the position corresponding to a (line,column).
|
long |
getStartPosition(long line) |
Finds the start position of a line.
|
-
-
Method Detail
-
getPosition
long getPosition(long line,
long column)
Finds the position corresponding to a (line,column).
- Parameters:
line
- line number (beginning at 1)
column
- tab-expanded column number (beginning 1)
- Returns:
- position of character
- Throws:
IndexOutOfBoundsException
- if line < 1
if line > no. of lines