public class ExtAttributes extends Object implements Iterable<ExtAttribute>
ExtAttribute objects and associated namespaces.| Constructor and Description |
|---|
ExtAttributes()
Creates a new empty
ExtAttributes object. |
ExtAttributes(ExtAttributes original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAttribute(String namespaceURI,
String localName)
Removes an attribute from this set.
|
ExtAttribute |
getAttribute(String namespaceURI,
String localName)
Gets an attribute if it exists.
|
String |
getAttributeValue(String namespaceURI,
String localName)
Gets the value for a given attribute name of a given namespace.
|
String |
getNamespacePrefix(String namespaceURI)
Gets the prefix for a given namespace URI.
|
Set<String> |
getNamespaces()
Gets the set of keys for the namespaces in this object.
|
boolean |
hasNamespace()
Indicates if this set has at least one namespace defined.
|
boolean |
isEmpty()
Indicates if this set is empty or not.
|
Iterator<ExtAttribute> |
iterator()
Creates an iterator for the attributes in this set.
|
ExtAttribute |
setAttribute(ExtAttribute attribute)
Sets a given attribute in this set.
|
ExtAttribute |
setAttribute(String localName,
String value)
Sets an attribute without namespace for this set.
|
ExtAttribute |
setAttribute(String namespaceURI,
String localName,
String value)
Sets an attribute in this set.
|
void |
setNamespace(String prefix,
String namespaceURI)
Sets a namespace in this set.
|
int |
size()
Gets the number of attributes in this set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ExtAttributes()
ExtAttributes object.public ExtAttributes(ExtAttributes original)
original - the original object to duplicate.public String getAttributeValue(String namespaceURI, String localName)
namespaceURI - the namespace URI of the attribute.localName - the name of the attribute.public ExtAttribute getAttribute(String namespaceURI, String localName)
namespaceURI - the namespace URI of the attribute QName.localName - the local name of the attribute.public ExtAttribute setAttribute(ExtAttribute attribute)
attribute - the attribute to add/set.public ExtAttribute setAttribute(String namespaceURI, String localName, String value)
namespaceURI - the namespace URI of the attribute.localName - the name of the attribute.value - the value of the attribute.public ExtAttribute setAttribute(String localName, String value)
localName - the name of the attribute.value - the value of the attribute.public void deleteAttribute(String namespaceURI, String localName)
namespaceURI - the namespace URI of the attribute.localName - the name of the attribute.public boolean isEmpty()
public int size()
public Iterator<ExtAttribute> iterator()
iterator in interface Iterable<ExtAttribute>public void setNamespace(String prefix, String namespaceURI)
prefix - the namespace prefix.namespaceURI - the namsepace URI.public String getNamespacePrefix(String namespaceURI)
namespaceURI - the namespace URI.public boolean hasNamespace()
Copyright © 2020. All rights reserved.