Interface AttributeList
-
public interface AttributeListContains the list of attributes inside an HTML tag.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intattributeCount()Return the count of attributesIterator<String>attributeNames()Return the list of attribute namesbooleancontainsAttribute(String name)Return a flag indicating whether a specified attribute existschargetQuoteChar(String name)Return an attribute's quote character, given its name or0if the attribute cannot be found.StringgetQuotedValue(String name)Return an attribute's value, already surrounded with the quotes originally in place.StringgetValue(String name)Return an attribute's value, given its name ornullif the attribute cannot be found.booleanisModified()Return a flag indicating whether this object was modified.voidremoveValue(String name)Remove an attribute's value.voidsetValue(String name, String value)Set an attribute's value.
-
-
-
Method Detail
-
attributeCount
int attributeCount()
Return the count of attributes- Returns:
- count of attributes
-
attributeNames
Iterator<String> attributeNames()
Return the list of attribute names- Returns:
Iteratoriterating over the attribute names
-
containsAttribute
boolean containsAttribute(String name)
Return a flag indicating whether a specified attribute exists- Parameters:
name- the attribute's name- Returns:
trueif the specified attribute exists,falseotherwise
-
getValue
String getValue(String name)
Return an attribute's value, given its name ornullif the attribute cannot be found.- Parameters:
name- attribute name- Returns:
- an attribute's value
-
getQuoteChar
char getQuoteChar(String name)
Return an attribute's quote character, given its name or0if the attribute cannot be found.- Parameters:
name- attribute name- Returns:
- an attribute's quote character
-
getQuotedValue
String getQuotedValue(String name)
Return an attribute's value, already surrounded with the quotes originally in place. Returnsnullif the attribute cannot be found- Parameters:
name- attribute name- Returns:
- an attribute's value
-
setValue
void setValue(String name, String value)
Set an attribute's value. If the value isnull, this is semantically different to aremoveValue(String).- Parameters:
name- attribute namevalue- attribute value
-
removeValue
void removeValue(String name)
Remove an attribute's value.- Parameters:
name- attribute name
-
isModified
boolean isModified()
Return a flag indicating whether this object was modified.- Returns:
trueif the object was modifiedfalseotherwise
-
-