BEA Systems, Inc.

com.beasys.commerce.util.dom
Class NamedNodeMapImpl

java.lang.Object
  |
  +--com.beasys.commerce.util.dom.DOMBase
        |
        +--com.beasys.commerce.util.dom.NamedNodeMapImpl

public class NamedNodeMapImpl
extends DOMBase
implements org.w3c.dom.NamedNodeMap

An implementation of the W3C's DOM NamedNodeMap object.

This implementation uses a Hashtable of Nodes to support the map, plus a Vector of the same Nodes to support ordered iteration. It probably could have better memory management, but this was easiest.

See Also:
Serialized Form

Constructor Summary
NamedNodeMapImpl(org.w3c.dom.Document owner)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Make a shallow clone of this object.
 int getLength()
          Return the number of nodes in this map.
 org.w3c.dom.Node getNamedItem(java.lang.String name)
          Get the named node in this map.
 org.w3c.dom.Node item(int index)
          Retrieve the node at index.
 org.w3c.dom.Node removeNamedItem(java.lang.String name)
          Remove the named node from this map.
 org.w3c.dom.Node setNamedItem(org.w3c.dom.Node node)
          Add a node using the node's name.
 
Methods inherited from class com.beasys.commerce.util.dom.DOMBase
checkOwnerDocument, getOwnerDocument, isReadOnly, setReadOnly
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedNodeMapImpl

public NamedNodeMapImpl(org.w3c.dom.Document owner)
Constructor.
Method Detail

clone

public java.lang.Object clone()
Make a shallow clone of this object.

getLength

public int getLength()
Return the number of nodes in this map.
Specified by:
getLength in interface org.w3c.dom.NamedNodeMap

item

public org.w3c.dom.Node item(int index)
Retrieve the node at index.
Specified by:
item in interface org.w3c.dom.NamedNodeMap

getNamedItem

public org.w3c.dom.Node getNamedItem(java.lang.String name)
Get the named node in this map.
Specified by:
getNamedItem in interface org.w3c.dom.NamedNodeMap
Parameters:
name - the name of the node.

removeNamedItem

public org.w3c.dom.Node removeNamedItem(java.lang.String name)
                                 throws org.w3c.dom.DOMException
Remove the named node from this map.
Specified by:
removeNamedItem in interface org.w3c.dom.NamedNodeMap
Parameters:
name - the name of the node.

setNamedItem

public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node node)
                              throws org.w3c.dom.DOMException
Add a node using the node's name.
Specified by:
setNamedItem in interface org.w3c.dom.NamedNodeMap
Parameters:
node - the node to add.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved