Top Inners Fields Constructors Methods
com.sun.webkit.dom

public Class NamedNodeMapImpl

extends Object
implements NamedNodeMap
Class Inheritance
All Implemented Interfaces
org.w3c.dom.NamedNodeMap
Imports
com.sun.webkit.Disposer, .DisposerRecord, org.w3c.dom.DOMException, .NamedNodeMap, .Node

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
NamedNodeMapImpl(long peer)

Method Summary

Modifier and TypeMethod and Description
pack-priv static NamedNodeMap
create(long peer)

private static native void
dispose(long peer)

public boolean
equals(Object
the reference object with which to compare.
that
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

pack-priv static NamedNodeMap
getImpl(long peer)

public int
getLength()

Implements org.w3c.dom.NamedNodeMap.getLength.

The number of nodes in this map.

pack-priv static native int
getLengthImpl(long peer)

public Node
getNamedItem(String
The nodeName of a node to retrieve.
name
)

Implements org.w3c.dom.NamedNodeMap.getNamedItem.

Retrieves a node specified by name.

pack-priv static native long
getNamedItemImpl(long peer, String name)

public Node
getNamedItemNS(String
The namespace URI of the node to retrieve.
namespaceURI
,
String
The local name of the node to retrieve.
localName
)

Implements org.w3c.dom.NamedNodeMap.getNamedItemNS.

Retrieves a node specified by local name and namespace URI.

pack-priv static native long
getNamedItemNSImpl(long peer, String namespaceURI, String localName)

pack-priv long
pack-priv static long
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public Node
item(int
Index into this map.
index
)

Implements org.w3c.dom.NamedNodeMap.item.

Returns the indexth item in the map.

pack-priv static native long
itemImpl(long peer, int index)

public Node
removeNamedItem(String
The nodeName of the node to remove.
name
)

Implements org.w3c.dom.NamedNodeMap.removeNamedItem.

Removes a node specified by name.

pack-priv static native long
removeNamedItemImpl(long peer, String name)

public Node
removeNamedItemNS(String
The namespace URI of the node to remove.
namespaceURI
,
String
The local name of the node to remove.
localName
)

Implements org.w3c.dom.NamedNodeMap.removeNamedItemNS.

Removes a node specified by local name and namespace URI.

pack-priv static native long
removeNamedItemNSImpl(long peer, String namespaceURI, String localName)

public Node
setNamedItem(Node
A node to store in this map. The node will later be accessible using the value of its nodeName attribute.
node
)

Implements org.w3c.dom.NamedNodeMap.setNamedItem.

Adds a node using its nodeName attribute.

pack-priv static native long
setNamedItemImpl(long peer, long node)

public Node
setNamedItemNS(Node
A node to store in this map. The node will later be accessible using the value of its namespaceURI and localName attributes.
node
)

Implements org.w3c.dom.NamedNodeMap.setNamedItemNS.

Adds a node using its namespaceURI and localName.

pack-priv static native long
setNamedItemNSImpl(long peer, long node)

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

peerback to summary
private final long peer

Constructor Detail

NamedNodeMapImplback to summary
pack-priv NamedNodeMapImpl(long peer)

Method Detail

createback to summary
pack-priv static NamedNodeMap create(long peer)
disposeback to summary
private static native void dispose(long peer)
equalsback to summary
public boolean equals(Object that)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
that:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getImplback to summary
pack-priv static NamedNodeMap getImpl(long peer)
getLengthback to summary
public int getLength()

Implements org.w3c.dom.NamedNodeMap.getLength.

Doc from org.w3c.dom.NamedNodeMap.getLength.

The number of nodes in this map. The range of valid child node indices is 0 to length-1 inclusive.

getLengthImplback to summary
pack-priv static native int getLengthImpl(long peer)
getNamedItemback to summary
public Node getNamedItem(String name)

Implements org.w3c.dom.NamedNodeMap.getNamedItem.

Doc from org.w3c.dom.NamedNodeMap.getNamedItem.

Retrieves a node specified by name.

Parameters
name:String

The nodeName of a node to retrieve.

Returns:Node

A Node (of any type) with the specified nodeName, or null if it does not identify any node in this map.

getNamedItemImplback to summary
pack-priv static native long getNamedItemImpl(long peer, String name)
getNamedItemNSback to summary
public Node getNamedItemNS(String namespaceURI, String localName)

Implements org.w3c.dom.NamedNodeMap.getNamedItemNS.

Doc from org.w3c.dom.NamedNodeMap.getNamedItemNS.

Retrieves a node specified by local name and namespace URI.
Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Parameters
namespaceURI:String

The namespace URI of the node to retrieve.

localName:String

The local name of the node to retrieve.

Returns:Node

A Node (of any type) with the specified local name and namespace URI, or null if they do not identify any node in this map.

getNamedItemNSImplback to summary
pack-priv static native long getNamedItemNSImpl(long peer, String namespaceURI, String localName)
getPeerback to summary
pack-priv long getPeer()
getPeerback to summary
pack-priv static long getPeer(NamedNodeMap arg)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
itemback to summary
public Node item(int index)

Implements org.w3c.dom.NamedNodeMap.item.

Doc from org.w3c.dom.NamedNodeMap.item.

Returns the indexth item in the map. If index is greater than or equal to the number of nodes in this map, this returns null.

Parameters
index:int

Index into this map.

Returns:Node

The node at the indexth position in the map, or null if that is not a valid index.

itemImplback to summary
pack-priv static native long itemImpl(long peer, int index)
removeNamedItemback to summary
public Node removeNamedItem(String name) throws DOMException

Implements org.w3c.dom.NamedNodeMap.removeNamedItem.

Doc from org.w3c.dom.NamedNodeMap.removeNamedItem.

Removes a node specified by name. When this map contains the attributes attached to an element, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.

Parameters
name:String

The nodeName of the node to remove.

Returns:Node

The node removed from this map if a node with such a name exists.

Exceptions
DOMException:
NOT_FOUND_ERR: Raised if there is no node named name in this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
removeNamedItemImplback to summary
pack-priv static native long removeNamedItemImpl(long peer, String name)
removeNamedItemNSback to summary
public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException

Implements org.w3c.dom.NamedNodeMap.removeNamedItemNS.

Doc from org.w3c.dom.NamedNodeMap.removeNamedItemNS.

Removes a node specified by local name and namespace URI. A removed attribute may be known to have a default value when this map contains the attributes attached to an element, as returned by the attributes attribute of the Node interface. If so, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Parameters
namespaceURI:String

The namespace URI of the node to remove.

localName:String

The local name of the node to remove.

Returns:Node

The node removed from this map if a node with such a local name and namespace URI exists.

Exceptions
DOMException:
NOT_FOUND_ERR: Raised if there is no node with the specified namespaceURI and localName in this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
removeNamedItemNSImplback to summary
pack-priv static native long removeNamedItemNSImpl(long peer, String namespaceURI, String localName)
setNamedItemback to summary
public Node setNamedItem(Node node) throws DOMException

Implements org.w3c.dom.NamedNodeMap.setNamedItem.

Doc from org.w3c.dom.NamedNodeMap.setNamedItem.

Adds a node using its nodeName attribute. If a node with that name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.
As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.

Parameters
node:Node

A node to store in this map. The node will later be accessible using the value of its nodeName attribute.

Returns:Node

If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.

Exceptions
DOMException:
WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
setNamedItemImplback to summary
pack-priv static native long setNamedItemImpl(long peer, long node)
setNamedItemNSback to summary
public Node setNamedItemNS(Node node) throws DOMException

Implements org.w3c.dom.NamedNodeMap.setNamedItemNS.

Doc from org.w3c.dom.NamedNodeMap.setNamedItemNS.

Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.
Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Parameters
node:Node

A node to store in this map. The node will later be accessible using the value of its namespaceURI and localName attributes.

Returns:Node

If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.

Exceptions
DOMException:
WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node doesn't belong in this NamedNodeMap. Examples would include trying to insert something other than an Attr node into an Element's map of attributes, or a non-Entity node into the DocumentType's map of Entities.
NOT_SUPPORTED_ERR: May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML 4.01]).
setNamedItemNSImplback to summary
pack-priv static native long setNamedItemNSImpl(long peer, long node)
com.sun.webkit.dom back to summary

private Class NamedNodeMapImpl.SelfDisposer

extends Object
implements DisposerRecord
Class Inheritance
All Implemented Interfaces
com.sun.webkit.DisposerRecord

Field Summary

Modifier and TypeField and Description
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
SelfDisposer(final long peer)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

peerback to summary
private final long peer

Constructor Detail

SelfDisposerback to summary
pack-priv SelfDisposer(final long peer)

Method Detail

disposeback to summary
public void dispose()

Implements com.sun.webkit.DisposerRecord.dispose.