Package org.jsoup.internal
Class LineMap
java.lang.Object
org.jsoup.internal.LineMap
public final class LineMap
extends Object
Maps source offsets to line and column coordinates. Jsoup internal; API subject to change.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLineStart(int pos) Records the source offset immediately after a newline.intcolumnNumber(int pos) Gets the 1-based column number for a source offset.voidcomplete()Trims the backing array after the parse has completed.intlineNumber(int pos) Gets the 1-based line number for a source offset.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Method Details
-
addLineStart
public void addLineStart(int pos) Records the source offset immediately after a newline. -
complete
public void complete()Trims the backing array after the parse has completed. -
lineNumber
public int lineNumber(int pos) Gets the 1-based line number for a source offset. -
columnNumber
public int columnNumber(int pos) Gets the 1-based column number for a source offset.
-