Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

All Implemented Interfaces:
  Serializable, NamedNodeMap

Direct Known Subclasses:
  AbstractElement.ExtendedNamedNodeHashMap

Enclosing class:
  AbstractElement

    public class AbstractElement.NamedNodeHashMap

extends Object
implements NamedNodeMap, Serializable

An implementation of the `NamedNodeMap`.
This Map is not Thread-safe, concurrent updates or reading while updating may give unexpected results.

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(Node arg)` Checks the validity of a node to add.
`protected Node` | `get(String ns, String nm)` Gets the value of a variable
`int` | `getLength()` DOM: Implements `NamedNodeMap.getLength()`.
`Node` | `getNamedItem(String name)` DOM: Implements `NamedNodeMap.getNamedItem(String)`.
`Node` | `getNamedItemNS(String namespaceURI, String localName)` DOM: Implements `NamedNodeMap.getNamedItemNS(String,String)`.
`protected int` | `hashCode(String ns, String nm)` Computes a hash code corresponding to the given strings.
`Node` | `item(int index)` DOM: Implements `NamedNodeMap.item(int)`.
`protected Node` | `put(String ns, String nm, Node value)` Sets a new value for the given variable
`protected void` | `rehash()` Rehash and grow the table.
`protected Node` | `remove(String ns, String nm)` Removes an entry from the table.
`Node` | `removeNamedItem(String name)` DOM: Implements `NamedNodeMap.removeNamedItem(String)`.
`Node` | `removeNamedItemNS(String namespaceURI, String localName)` DOM: Implements `NamedNodeMap.removeNamedItemNS(String,String)`.
`Node` | `setNamedItem(Node arg)` DOM: Implements `NamedNodeMap.setNamedItem(Node)`.
`Node` | `setNamedItem(String ns, String name, Node arg)` Adds a node to the map.
`Node` | `setNamedItemNS(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 Node getNamedItem(String name)

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

  Specified by:
    `getNamedItem` in interface `NamedNodeMap`

### setNamedItem

    public Node setNamedItem(Node arg)
                      throws DOMException

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

  Specified by:
    `setNamedItem` in interface `NamedNodeMap`
  Throws:
    `DOMException`

### removeNamedItem

    public Node removeNamedItem(String name)
                         throws DOMException

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

  Specified by:
    `removeNamedItem` in interface `NamedNodeMap`
  Throws:
    `DOMException`

### item

    public Node item(int index)

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

  Specified by:
    `item` in interface `NamedNodeMap`

### getLength

    public int getLength()

  DOM: Implements `NamedNodeMap.getLength()`.

  Specified by:
    `getLength` in interface `NamedNodeMap`

### getNamedItemNS

    public Node getNamedItemNS(String namespaceURI,
                               String localName)

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

  Specified by:
    `getNamedItemNS` in interface `NamedNodeMap`

### setNamedItemNS

    public Node setNamedItemNS(Node arg)
                        throws DOMException

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

  Specified by:
    `setNamedItemNS` in interface `NamedNodeMap`
  Throws:
    `DOMException`

### removeNamedItemNS

    public Node removeNamedItemNS(String namespaceURI,
                                  String localName)
                           throws DOMException

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

  Specified by:
    `removeNamedItemNS` in interface `NamedNodeMap`
  Throws:
    `DOMException`

### setNamedItem

    public Node setNamedItem(String ns,
                             String name,
                             Node arg)
                      throws DOMException

  Adds a node to the map.

  Throws:
    `DOMException`

### checkNode

    protected void checkNode(Node arg)

  Checks the validity of a node to add.

### get

    protected Node get(String ns,
                       String nm)

  Gets the value of a variable

  Returns:
    the value or null

### put

    protected Node put(String ns,
                       String nm,
                       Node value)

  Sets a new value for the given variable

  Returns:
    the old value or null

### remove

    protected Node remove(String ns,
                          String nm)

  Removes an entry from the table.

  Returns:
    the value or null.

### rehash

    protected void rehash()

  Rehash and grow the table.

### hashCode

    protected int hashCode(String ns,
                           String nm)

  Computes a hash code corresponding to the given strings.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.