Package 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
An implementation of the
This Map is not Thread-safe, concurrent updates or reading while updating may give unexpected results.
NamedNodeMap
.
This Map is not Thread-safe, concurrent updates or reading while updating may give unexpected results.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The number of entriesprotected static final int
The initial capacityprotected AbstractElement.Entry[]
The underlying array -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Checks the validity of a node to add.protected Node
Gets the value of a variableint
DOM: ImplementsNamedNodeMap.getLength()
.getNamedItem
(String name) DOM: ImplementsNamedNodeMap.getNamedItem(String)
.getNamedItemNS
(String namespaceURI, String localName) DOM: ImplementsNamedNodeMap.getNamedItemNS(String,String)
.protected int
Computes a hash code corresponding to the given strings.item
(int index) DOM: ImplementsNamedNodeMap.item(int)
.protected Node
Sets a new value for the given variableprotected void
rehash()
Rehash and grow the table.protected Node
Removes an entry from the table.removeNamedItem
(String name) DOM: ImplementsNamedNodeMap.removeNamedItem(String)
.removeNamedItemNS
(String namespaceURI, String localName) DOM: ImplementsNamedNodeMap.removeNamedItemNS(String,String)
.setNamedItem
(String ns, String name, Node arg) Adds a node to the map.setNamedItem
(Node arg) DOM: ImplementsNamedNodeMap.setNamedItem(Node)
.setNamedItemNS
(Node arg) DOM: ImplementsNamedNodeMap.setNamedItemNS(Node)
.
-
Field Details
-
INITIAL_CAPACITY
protected static final int INITIAL_CAPACITYThe initial capacity- See Also:
-
table
The underlying array -
count
protected int countThe number of entries
-
-
Constructor Details
-
NamedNodeHashMap
public NamedNodeHashMap()Creates a new NamedNodeHashMap object.
-
-
Method Details
-
getNamedItem
DOM: ImplementsNamedNodeMap.getNamedItem(String)
.- Specified by:
getNamedItem
in interfaceNamedNodeMap
-
setNamedItem
DOM: ImplementsNamedNodeMap.setNamedItem(Node)
.- Specified by:
setNamedItem
in interfaceNamedNodeMap
- Throws:
DOMException
-
removeNamedItem
DOM: ImplementsNamedNodeMap.removeNamedItem(String)
.- Specified by:
removeNamedItem
in interfaceNamedNodeMap
- Throws:
DOMException
-
item
DOM: ImplementsNamedNodeMap.item(int)
.- Specified by:
item
in interfaceNamedNodeMap
-
getLength
public int getLength()DOM: ImplementsNamedNodeMap.getLength()
.- Specified by:
getLength
in interfaceNamedNodeMap
-
getNamedItemNS
DOM: ImplementsNamedNodeMap.getNamedItemNS(String,String)
.- Specified by:
getNamedItemNS
in interfaceNamedNodeMap
-
setNamedItemNS
DOM: ImplementsNamedNodeMap.setNamedItemNS(Node)
.- Specified by:
setNamedItemNS
in interfaceNamedNodeMap
- Throws:
DOMException
-
removeNamedItemNS
DOM: ImplementsNamedNodeMap.removeNamedItemNS(String,String)
.- Specified by:
removeNamedItemNS
in interfaceNamedNodeMap
- Throws:
DOMException
-
setNamedItem
Adds a node to the map.- Throws:
DOMException
-
checkNode
Checks the validity of a node to add. -
get
Gets the value of a variable- Returns:
- the value or null
-
put
Sets a new value for the given variable- Returns:
- the old value or null
-
remove
Removes an entry from the table.- Returns:
- the value or null.
-
rehash
protected void rehash()Rehash and grow the table. -
hashCode
Computes a hash code corresponding to the given strings.
-