|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.htmlparser.lexer.Cursor
A bookmark in a page. This class remembers the page it came from and its position within the page.
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(java.lang.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. |
java.lang.String |
toString()
Return a string representation of this cursor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int mPosition
protected Page mPage
Constructor Detail |
public Cursor(Page page, int offset)
Cursor
from the page and position given.
page
- The page this cursor is on.offset
- The character offset within the page.Method Detail |
public Page getPage()
public int getPosition()
public void setPosition(int position)
position
- The new cursor position.public void advance()
public void retreat()
public Cursor dup()
this
one is,
and referring to the same page.public java.lang.String toString()
public int compare(java.lang.Object that)
compare
in interface Ordered
that
- The object to compare this to.
Ordered
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |