public static interface Position.LineMap extends LineMap
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber(int pos)
Find the column for a character position.
|
int |
getLineNumber(int pos)
Find the line containing a position; a line termination
character is on the line it terminates.
|
int |
getPosition(int line,
int column)
Find the position corresponding to a (line,column).
|
int |
getStartPosition(int line)
Find the start position of a line.
|
getColumnNumber, getLineNumber, getPosition, getStartPosition
int getStartPosition(int line)
line
- number of line (first is 1)ArrayIndexOutOfBoundsException
- if lineNumber < 1
if lineNumber > no. of lines
int getPosition(int line, int column)
line
- number of line (first is 1)column
- number of character on line (first is 1)ArrayIndexOutOfBoundsException
- if line < 1
if line > no. of lines
int getLineNumber(int pos)
pos
- character offset of the positionint getColumnNumber(int pos)
pos
- character offset of the positionCopyright © 2015. All rights reserved.