|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.xml.QDomNamedNodeMap
public class QDomNamedNodeMap
The QDomNamedNodeMap class contains a collection of nodes that can be accessed by name.
Note that QDomNamedNodeMap does not inherit from QDomNodeList. QDomNamedNodeMaps do not provide any specific node ordering. Although nodes in a QDomNamedNodeMap may be accessed by an ordinal index, this is simply to allow a convenient enumeration of the contents of a QDomNamedNodeMap, and does not imply that the DOM specifies an ordering of the nodes.
The QDomNamedNodeMap is used in three places:
Items in the map are identified by the name which QDomNode::name() returns. Nodes are retrieved using namedItem, namedItemNS or item. New nodes are inserted with setNamedItem or setNamedItemNS and removed with removeNamedItem or removeNamedItemNS. Use contains to see if an item with the given name is in the named node map. The number of items is returned by length.
Terminology: in this class we use "item" and "node" interchangeably.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
QDomNamedNodeMap()
Constructs an empty named node map. |
|
QDomNamedNodeMap(QDomNamedNodeMap arg__1)
Constructs a copy of arg__1. |
Method Summary | |
---|---|
boolean |
contains(java.lang.String name)
Returns true if the map contains a node called name; otherwise returns false. |
int |
count()
This function is provided for Qt API consistency. |
boolean |
equals(java.lang.Object other)
|
static QDomNamedNodeMap |
fromNativePointer(QNativePointer nativePointer)
This function returns the QDomNamedNodeMap instance pointed to by nativePointer |
boolean |
isEmpty()
Returns true if the map is empty; otherwise returns false. |
QDomNode |
item(int index)
Retrieves the node at position index. |
int |
length()
Returns the number of nodes in the map. |
QDomNode |
namedItem(java.lang.String name)
Returns the node called name. |
QDomNode |
namedItemNS(java.lang.String nsURI,
java.lang.String localName)
Returns the node associated with the local name localName and the namespace URI nsURI. |
static QNativePointer |
nativePointerArray(QDomNamedNodeMap[] array)
This function returns a QNativePointer that is pointing to the specified QDomNamedNodeMap array. |
QDomNode |
removeNamedItem(java.lang.String name)
Removes the node called name from the map. |
QDomNode |
removeNamedItemNS(java.lang.String nsURI,
java.lang.String localName)
Removes the node with the local name localName and the namespace URI nsURI from the map. |
QDomNode |
setNamedItem(QDomNode newNode)
Inserts the node newNode into the named node map. |
QDomNode |
setNamedItemNS(QDomNode newNode)
Inserts the node newNode in the map. |
int |
size()
This function is provided for Qt API consistency. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QDomNamedNodeMap()
Constructs an empty named node map.
public QDomNamedNodeMap(QDomNamedNodeMap arg__1)
Constructs a copy of arg__1.
Method Detail |
---|
public final boolean contains(java.lang.String name)
Returns true if the map contains a node called name; otherwise returns false.
Note: This function does not take the presence of namespaces into account. Use namedItemNS to test whether the map contains a node with a specific namespace URI and name.
public final int count()
This function is provided for Qt API consistency. It is equivalent to length.
public final boolean isEmpty()
Returns true if the map is empty; otherwise returns false. This function is provided for Qt API consistency.
public final QDomNode item(int index)
Retrieves the node at position index.
This can be used to iterate over the map. Note that the nodes in the map are ordered arbitrarily.
public final int length()
Returns the number of nodes in the map.
public final QDomNode namedItem(java.lang.String name)
Returns the node called name.
If the named node map does not contain such a node, a null node is returned. A node's name is the name returned by QDomNode::nodeName().
public final QDomNode namedItemNS(java.lang.String nsURI, java.lang.String localName)
Returns the node associated with the local name localName and the namespace URI nsURI.
If the map does not contain such a node, a null node is returned.
public final QDomNode removeNamedItem(java.lang.String name)
Removes the node called name from the map.
The function returns the removed node or a null node if the map did not contain a node called name.
public final QDomNode removeNamedItemNS(java.lang.String nsURI, java.lang.String localName)
Removes the node with the local name localName and the namespace URI nsURI from the map.
The function returns the removed node or a null node if the map did not contain a node with the local name localName and the namespace URI nsURI.
public final QDomNode setNamedItem(QDomNode newNode)
Inserts the node newNode into the named node map. The name used by the map is the node name of newNode as returned by QDomNode::nodeName().
If the new node replaces an existing node, i.e. the map contains a node with the same name, the replaced node is returned.
public final QDomNode setNamedItemNS(QDomNode newNode)
Inserts the node newNode in the map. If a node with the same namespace URI and the same local name already exists in the map, it is replaced by newNode. If the new node replaces an existing node, the replaced node is returned.
public final int size()
This function is provided for Qt API consistency. It is equivalent to length.
public static QDomNamedNodeMap fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QDomNamedNodeMap[] array)
array
- the array that the returned pointer will point to.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |