-
public interface LineMapProvides methods to convert between character positions and line numbers for a compilation unit.- Since:
- 9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetColumnNumber(long pos)Find the column for a character position.longgetLineNumber(long pos)Find the line containing a position; a line termination character is on the line it terminates.
-
-
-
Method Detail
-
getLineNumber
long getLineNumber(long pos)
Find the line containing a position; a line termination character is on the line it terminates.- Parameters:
pos- character offset of the position- Returns:
- the line number of pos (first line is 1)
-
getColumnNumber
long getColumnNumber(long pos)
Find the column for a character position. Tab characters preceding the position on the same line will be expanded when calculating the column number.- Parameters:
pos- character offset of the position- Returns:
- the tab-expanded column number of pos (first column is 1)
-
-