Interface AttributeList
public interface AttributeList
Contains the list of attributes inside an HTML tag.
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the count of attributesReturn the list of attribute namesboolean
containsAttribute
(String name) Return a flag indicating whether a specified attribute existschar
getQuoteChar
(String name) Return an attribute's quote character, given its name or0
if the attribute cannot be found.getQuotedValue
(String name) Return an attribute's value, already surrounded with the quotes originally in place.Return an attribute's value, given its name ornull
if the attribute cannot be found.boolean
Return a flag indicating whether this object was modified.void
removeValue
(String name) Remove an attribute's value.void
Set an attribute's value.
-
Method Details
-
attributeCount
int attributeCount()Return the count of attributes- Returns:
- count of attributes
-
attributeNames
Return the list of attribute names- Returns:
Iterator
iterating over the attribute names
-
containsAttribute
Return a flag indicating whether a specified attribute exists- Parameters:
name
- the attribute's name- Returns:
true
if the specified attribute exists,false
otherwise
-
getValue
Return an attribute's value, given its name ornull
if the attribute cannot be found.- Parameters:
name
- attribute name- Returns:
- an attribute's value
-
getQuoteChar
Return an attribute's quote character, given its name or0
if the attribute cannot be found.- Parameters:
name
- attribute name- Returns:
- an attribute's quote character
-
getQuotedValue
Return an attribute's value, already surrounded with the quotes originally in place. Returnsnull
if the attribute cannot be found- Parameters:
name
- attribute name- Returns:
- an attribute's value
-
setValue
Set an attribute's value. If the value isnull
, this is semantically different to aremoveValue(String)
.- Parameters:
name
- attribute namevalue
- attribute value
-
removeValue
Remove an attribute's value.- Parameters:
name
- attribute name
-
isModified
boolean isModified()Return a flag indicating whether this object was modified.- Returns:
true
if the object was modifiedfalse
otherwise
-