public class TagTokenizer.ReusableToken extends Object implements Tag
Modifier and Type | Field and Description |
---|---|
int |
attributeCount |
String[] |
attributes |
Constructor and Description |
---|
TagTokenizer.ReusableToken() |
Modifier and Type | Method and Description |
---|---|
int |
getAttributeCount()
Number of attributes in tag.
|
int |
getAttributeIndex(String name,
boolean caseSensitive)
Determine which attribute has the specified name.
|
String |
getAttributeName(int index)
Get name of attribute.
|
String |
getAttributeValue(int index)
Get value of an attribute.
|
String |
getAttributeValue(String name,
boolean caseSensitive)
Get value of an attribute.
|
String |
getName()
Name of tag (ie.
|
Tag.Type |
getType()
Type of tag (e.g.
|
boolean |
hasAttribute(String name,
boolean caseSensitive)
Determine if an attribute is present.
|
String |
toString()
Get the complete tag in its original form, preserving original formatting.
|
void |
writeTo(Appendable out)
Write out the complete tag in its original form, preserving original formatting.
|
public int attributeCount
public String[] attributes
public String getName()
Tag
public Tag.Type getType()
Tag
public void writeTo(Appendable out) throws IOException
Tag
writeTo
in interface Tag
IOException
public int getAttributeCount()
Tag
getAttributeCount
in interface Tag
public int getAttributeIndex(String name, boolean caseSensitive)
Tag
getAttributeIndex
in interface Tag
public String getAttributeName(int index)
Tag
getAttributeName
in interface Tag
public String getAttributeValue(int index)
Tag
getAttributeValue
in interface Tag
public String getAttributeValue(String name, boolean caseSensitive)
Tag
getAttributeValue
in interface Tag
public boolean hasAttribute(String name, boolean caseSensitive)
Tag
hasAttribute
in interface Tag
public String toString()
Tag
This has a slight overhead in that it needs to construct a String. For improved performance, use writeTo() instead.
toString
in interface Tag
toString
in class Object
Tag.writeTo(Appendable)
Copyright © 2015. All Rights Reserved.