com.gargoylesoftware.htmlunit.html
Class HtmlAttr

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.HtmlAttr
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map.Entry

public class HtmlAttr
extends DomNode
implements java.util.Map.Entry

A thin wrapper around attributes. Attributes are stored as Map.Entry in HtmlElement, but the xpath engine expects attributes to be in a DomNode.

Version:
$Revision: 1.3 $
Author:
Denis N. Antonioli, David K. Taylor
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
 
Constructor Summary
HtmlAttr(HtmlElement htmlElement, java.util.Map.Entry mapEntry)
 Instantiate a new wrapper.
 
Method Summary
 java.lang.Object getHtmlValue()
  
 java.lang.Object getKey()
  
 java.lang.String getNodeName()
 Get the name for the current node.
 short getNodeType()
 Get the type of the current node.
 java.lang.String getNodeValue()
 Get the value for the current node.
 java.lang.Object setHtmlValue(java.lang.Object value)
 Delegate to the wrapped map entry.
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, appendDomChild, asText, asXml, cloneDomNode, getAllHtmlChildElements, getByXPath, getChildIterator, getEndColumnNumber, getEndLineNumber, getEventHandler, getFirstDomChild, getLastDomChild, getNextDomSibling, getPage, getParentDomNode, getPreviousDomSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, insertBefore, remove, removeAllChildren, removeDomChangeListener, removeEventHandler, replace, setEventHandler, setEventHandler, setNodeValue, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
equals, getValue, hashCode, setValue
 

Constructor Detail

HtmlAttr

public HtmlAttr(HtmlElement htmlElement,
                java.util.Map.Entry mapEntry)
Instantiate a new wrapper.

Parameters:
htmlElement - The parent element.
mapEntry - The wrapped Map.Entry.
Method Detail

getHtmlValue

public java.lang.Object getHtmlValue()
Returns:
The value of wrapped map entry.

getKey

public java.lang.Object getKey()
Specified by:
getKey in interface java.util.Map.Entry
Returns:
The key of wrapped map entry.

getNodeName

public java.lang.String getNodeName()
Description copied from class: DomNode
Get the name for the current node.

Specified by:
getNodeName in class DomNode
Returns:
The same value as returned by getKey().

getNodeType

public short getNodeType()
Description copied from class: DomNode
Get the type of the current node.

Specified by:
getNodeType in class DomNode
Returns:
the node type

getNodeValue

public java.lang.String getNodeValue()
Description copied from class: DomNode
Get the value for the current node.

Overrides:
getNodeValue in class DomNode
Returns:
The same value as returned by getValue().

setHtmlValue

public java.lang.Object setHtmlValue(java.lang.Object value)
Delegate to the wrapped map entry.

Parameters:
value - new value to be stored in this entry.
Returns:
old value corresponding to the entry.


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.