## org.apache.batik.dom
Class AbstractElement.NamedNodeHashMap

    java.lang.Object
      org.apache.batik.dom.AbstractElement.NamedNodeHashMap

All Implemented Interfaces:
  org.w3c.dom.NamedNodeMap, java.io.Serializable

Direct Known Subclasses:
  AbstractElement.ExtendedNamedNodeHashMap

Enclosing class:
  AbstractElement

public class AbstractElement.NamedNodeHashMap
extends java.lang.Object
implements org.w3c.dom.NamedNodeMap, java.io.Serializable

An implementation of the `NamedNodeMap`.

See Also:
  Serialized Form

Field Summary
`protected int` `count` The number of entries
`protected static int` `INITIAL_CAPACITY` The initial capacity
`protected AbstractElement.Entry[]` `table` The underlying array

Constructor Summary
`AbstractElement.NamedNodeHashMap()` Creates a new NamedNodeHashMap object.

Method Summary
`protected void` `checkNode(org.w3c.dom.Node arg)` Checks the validity of a node to add.
`protected org.w3c.dom.Node` `get(java.lang.String ns, java.lang.String nm)` Gets the value of a variable
`int` `getLength()` DOM: Implements `NamedNodeMap.getLength()`.
`org.w3c.dom.Node` `getNamedItem(java.lang.String name)` DOM: Implements `NamedNodeMap.getNamedItem(String)`.
`org.w3c.dom.Node` `getNamedItemNS(java.lang.String namespaceURI, java.lang.String localName)` DOM: Implements `NamedNodeMap.getNamedItemNS(String,String)`.
`protected int` `hashCode(java.lang.String ns, java.lang.String nm)` Computes a hash code corresponding to the given strings.
`org.w3c.dom.Node` `item(int index)` DOM: Implements `NamedNodeMap.item(int)`.
`protected org.w3c.dom.Node` `put(java.lang.String ns, java.lang.String nm, org.w3c.dom.Node value)` Sets a new value for the given variable
`protected void` `rehash()` Rehash the table
`protected org.w3c.dom.Node` `remove(java.lang.String ns, java.lang.String nm)` Removes an entry from the table.
`org.w3c.dom.Node` `removeNamedItem(java.lang.String name)` DOM: Implements `NamedNodeMap.removeNamedItem(String)`.
`org.w3c.dom.Node` `removeNamedItemNS(java.lang.String namespaceURI, java.lang.String localName)` DOM: Implements `NamedNodeMap.removeNamedItemNS(String,String)`.
`org.w3c.dom.Node` `setNamedItem(org.w3c.dom.Node arg)` DOM: Implements `NamedNodeMap.setNamedItem(Node)`.
`org.w3c.dom.Node` `setNamedItem(java.lang.String ns, java.lang.String name, org.w3c.dom.Node arg)` Adds a node to the map.
`org.w3c.dom.Node` `setNamedItemNS(org.w3c.dom.Node arg)` DOM: Implements `NamedNodeMap.setNamedItemNS(Node)`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INITIAL_CAPACITY

    protected static final int INITIAL_CAPACITY

  The initial capacity

  See Also:
    Constant Field Values

### table

    protected AbstractElement.Entry[] table

  The underlying array

### count

    protected int count

  The number of entries

Constructor Detail

### AbstractElement.NamedNodeHashMap

    public AbstractElement.NamedNodeHashMap()

  Creates a new NamedNodeHashMap object.

Method Detail

### getNamedItem

    public org.w3c.dom.Node getNamedItem(java.lang.String name)

  DOM: Implements `NamedNodeMap.getNamedItem(String)`.

  Specified by:
    `getNamedItem` in interface `org.w3c.dom.NamedNodeMap`

### setNamedItem

    public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg)
                                  throws org.w3c.dom.DOMException

  DOM: Implements `NamedNodeMap.setNamedItem(Node)`.

  Specified by:
    `setNamedItem` in interface `org.w3c.dom.NamedNodeMap`
  Throws:
    `org.w3c.dom.DOMException`

### removeNamedItem

    public org.w3c.dom.Node removeNamedItem(java.lang.String name)
                                     throws org.w3c.dom.DOMException

  DOM: Implements `NamedNodeMap.removeNamedItem(String)`.

  Specified by:
    `removeNamedItem` in interface `org.w3c.dom.NamedNodeMap`
  Throws:
    `org.w3c.dom.DOMException`

### item

    public org.w3c.dom.Node item(int index)

  DOM: Implements `NamedNodeMap.item(int)`.

  Specified by:
    `item` in interface `org.w3c.dom.NamedNodeMap`

### getLength

    public int getLength()

  DOM: Implements `NamedNodeMap.getLength()`.

  Specified by:
    `getLength` in interface `org.w3c.dom.NamedNodeMap`

### getNamedItemNS

    public org.w3c.dom.Node getNamedItemNS(java.lang.String namespaceURI,
                                           java.lang.String localName)

  DOM: Implements `NamedNodeMap.getNamedItemNS(String,String)`.

  Specified by:
    `getNamedItemNS` in interface `org.w3c.dom.NamedNodeMap`

### setNamedItemNS

    public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg)
                                    throws org.w3c.dom.DOMException

  DOM: Implements `NamedNodeMap.setNamedItemNS(Node)`.

  Specified by:
    `setNamedItemNS` in interface `org.w3c.dom.NamedNodeMap`
  Throws:
    `org.w3c.dom.DOMException`

### removeNamedItemNS

    public org.w3c.dom.Node removeNamedItemNS(java.lang.String namespaceURI,
                                              java.lang.String localName)
                                       throws org.w3c.dom.DOMException

  DOM: Implements `NamedNodeMap.removeNamedItemNS(String,String)`.

  Specified by:
    `removeNamedItemNS` in interface `org.w3c.dom.NamedNodeMap`
  Throws:
    `org.w3c.dom.DOMException`

### setNamedItem

    public org.w3c.dom.Node setNamedItem(java.lang.String ns,
                                         java.lang.String name,
                                         org.w3c.dom.Node arg)
                                  throws org.w3c.dom.DOMException

  Adds a node to the map.

  Throws:
    `org.w3c.dom.DOMException`

### checkNode

    protected void checkNode(org.w3c.dom.Node arg)

  Checks the validity of a node to add.

### get

    protected org.w3c.dom.Node get(java.lang.String ns,
                                   java.lang.String nm)

  Gets the value of a variable

  Returns:
    the value or null

### put

    protected org.w3c.dom.Node put(java.lang.String ns,
                                   java.lang.String nm,
                                   org.w3c.dom.Node value)

  Sets a new value for the given variable

  Returns:
    the old value or null

### remove

    protected org.w3c.dom.Node remove(java.lang.String ns,
                                      java.lang.String nm)

  Removes an entry from the table.

  Returns:
    the value or null.

### rehash

    protected void rehash()

  Rehash the table

### hashCode

    protected int hashCode(java.lang.String ns,
                           java.lang.String nm)

  Computes a hash code corresponding to the given strings.

Copyright © 2004 Apache Software Foundation. All Rights Reserved.