|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.html.Tag
public class Tag
This class describes a HTML tag. That is something like "<tagname key=value key=value key>"
| Nested Class Summary | |
|---|---|
static class |
Tag.Pair
This class is a key value pair. |
| Constructor Summary | |
|---|---|
Tag()
|
|
Tag(String type)
Create a new Tag with given type |
|
| Method Summary | |
|---|---|
void |
addArg(String key,
String value)
Add a new key/value Pair to this tag. |
void |
addArg(String key,
String value,
boolean changed)
Add a new key/value Pair to this tag. |
String |
getAttribute(String key)
Get the value of the given key. |
String |
getLowerCaseType()
Get the lowercase type of this tag. |
TagType |
getTagType()
Get the tagtype of this tag. |
Token |
getToken()
Get the parent token of this tag. |
String |
getType()
Get the type of this tag. |
void |
removeAttribute(String remover)
Remove an attribute. |
void |
setAttribute(String key,
String value)
Set the attribute given. |
void |
setToken(Token token)
Set the parent token of this tag. |
void |
setType(String type)
Set the Type of this Tag. |
String |
toString()
Get this Tag as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Tag()
public Tag(String type)
type - the type of the tag (like "body").| Method Detail |
|---|
public void setType(String type)
type - the new type of this tag.public String getType()
public String getLowerCaseType()
public TagType getTagType()
public Token getToken()
public void setToken(Token token)
token - the parent of this tag.
public void addArg(String key,
String value)
key - the key.value - the value.
public void addArg(String key,
String value,
boolean changed)
key - the key.value - the value.changed - if true this tag is changed by this (that is a new
parameter is added)
if false this tag is still considered unchanged after
this operation (useful while parsing a page).public void removeAttribute(String remover)
remover - the attribute key to remove.public String getAttribute(String key)
key - the attribute to get the value from.
public void setAttribute(String key,
String value)
key - the key to set.value - the value to set.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||