|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.html.Token
public class Token
This class is used to describe a small part of a html page. A small part is the text between the tags, a tag, a comment or a script.
| Constructor Summary | |
|---|---|
Token(char[] page,
TokenType type,
int startindex,
int len)
Create a new Token with given arguments. |
|
Token(String text)
Create a new Token of type TEXT with given text. |
|
Token(String text,
TokenType type,
int startindex)
Create a new Token with given arguments. |
|
Token(Tag tag)
Create a new Token of type Tag with given Tag. |
|
Token(Tag tag,
boolean changed)
Create a new Token of type Tag with given Tag. |
|
Token(Tag tag,
int startindex)
Create a new Token with given arguments and of type TAG. |
|
| Method Summary | |
|---|---|
void |
empty()
Empty this token, That is set its type to EMPTY and set the text and tag to null. |
boolean |
getChanged()
Has this Token changed since it was created? |
int |
getLength()
Get the length of this token. |
int |
getStartIndex()
Get the start index of this Token. |
Tag |
getTag()
Get the tag of this token. |
String |
getText()
Get the text of this token. |
TokenType |
getType()
Get the type of this token. |
void |
setChanged(boolean changed)
Set the change value of this Token. |
void |
setStartIndex(int startindex)
Set the start index of this Token. |
void |
setTag(Tag tag)
Set the tag of this token, also set the type to TAG. |
void |
setText(String text)
Set the text of this Token, also sets the type to TEXT. |
String |
toString()
Get the String representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Token(String text)
text - the String of this Token.public Token(Tag tag)
tag - the Tag of this Token.
public Token(Tag tag,
boolean changed)
tag - the Tag of this Token.changed - if true this tag is considered changed,
if false this tag is unmodified.
public Token(String text,
TokenType type,
int startindex)
text - the text of this Token.type - the type of this token.startindex - the start index of this token.
public Token(char[] page,
TokenType type,
int startindex,
int len)
page - the text of this Token.type - the type of this token.startindex - the start index of this token.len - the length of this token.
public Token(Tag tag,
int startindex)
tag - the Tag of this Token.startindex - the start index of this token.| Method Detail |
|---|
public Tag getTag()
public void setTag(Tag tag)
tag - the Tag to hold.public String getText()
public void setText(String text)
text - the text of this token.public TokenType getType()
public boolean getChanged()
public void setChanged(boolean changed)
changed - the new change value of this Token.public int getStartIndex()
public void setStartIndex(int startindex)
startindex - the new startindex.public int getLength()
public void empty()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||