java.io.Serializable
, java.lang.Cloneable
, Ordered
public class Cursor extends java.lang.Object implements java.io.Serializable, Ordered, java.lang.Cloneable
Modifier and Type | Field | Description |
---|---|---|
protected Page |
mPage |
This cursor's page.
|
protected int |
mPosition |
This cursor's position.
|
Constructor | Description |
---|---|
Cursor(Page page,
int offset) |
Construct a
Cursor from the page and position given. |
Modifier and Type | Method | Description |
---|---|---|
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
|
protected int mPosition
protected Page mPage
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.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()
toString
in class java.lang.Object
public int compare(java.lang.Object that)
HTML Parser is an open source library released under LGPL.