org.htmlparser.lexer
public class Cursor extends Object implements Serializable, Ordered, Cloneable
Field Summary | |
---|---|
protected Page | mPage
This cursor's page. |
protected int | mPosition
This cursor's position. |
Constructor Summary | |
---|---|
Cursor(Page page, int offset)
Construct a Cursor from the page and position given. |
Method Summary | |
---|---|
void | advance()
Move the cursor position ahead one character. |
int | compare(Object that)
Compare one reference to another. |
Cursor | dup()
Make a new cursor just like this one. |
Page | getPage()
Get this cursor's page. |
int | getPosition()
Get the position of this cursor. |
void | retreat()
Move the cursor position back one character. |
void | setPosition(int position)
Set the position of this cursor. |
String | toString()
Return a string representation of this cursor |
Cursor
from the page and position given.Parameters: page The page this cursor is on. offset The character offset within the page.
Parameters: that The object to compare this to.
Returns: A negative integer, zero, or a positive integer as this object is less than, equal to, or greater than that object.
See Also: Ordered
Returns: The new cursor positioned where this
one is,
and referring to the same page.
Returns: The page associated with this cursor.
Returns: The cursor position.
Parameters: position The new cursor position.
Returns: A string of the form "n[r,c]", where n is the character position, r is the row (zero based) and c is the column (zero based) on the page.
HTML Parser is an open source library released under LGPL. | |