@Exported public interface LineMap
| Modifier and Type | Method and Description | 
|---|---|
| long | getColumnNumber(long pos)Find the column for a character position. | 
| long | getLineNumber(long pos)Find the line containing a position; a line termination
 character is on the line it terminates. | 
| long | getPosition(long line,
           long column)Find the position corresponding to a (line,column). | 
| long | getStartPosition(long line)Find the start position of a line. | 
long getStartPosition(long line)
line - line number (beginning at 1)IndexOutOfBoundsException - if lineNumber < 1
           if lineNumber > no. of lineslong getPosition(long line,
                 long column)
line - line number (beginning at 1)column - tab-expanded column number (beginning 1)IndexOutOfBoundsException - if line < 1
           if line > no. of lineslong getLineNumber(long pos)
pos - character offset of the positionlong getColumnNumber(long pos)
pos - character offset of the position
 Copyright © 2005, 2025, Oracle and/or its affiliates.  All rights reserved.