public class OMAttributeImpl extends OMInformationItemImpl implements org.apache.axiom.om.impl.common.AxiomAttribute
| Constructor and Description |
|---|
OMAttributeImpl(String localName,
org.apache.axiom.om.OMNamespace ns,
String value,
org.apache.axiom.om.OMFactory factory)
Constructor OMAttributeImpl.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.axiom.om.OMInformationItem |
clone(org.apache.axiom.om.OMCloneOptions options) |
boolean |
equals(Object obj)
Checks for the equality of two
OMAttribute instances. |
String |
getAttributeType() |
String |
getAttributeValue() |
String |
getNamespaceURI() |
org.apache.axiom.om.OMFactory |
getOMFactory() |
int |
hashCode() |
void |
setAttributeType(String type)
Method setAttributeType.
|
void |
setAttributeValue(String value)
Method setAttributeValue.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetOwner, setNamespace, setOMNamespacecoreGetOwnerElement, coreGetSpecified, coreSetOwnerDocument, coreSetSpecified, internalSetOwnerElement, internalUnsetOwnerElementgetLocalName, getNamespace, getPrefix, getQName, handleNamespace, hasName, internalGetLocalName, internalSetLocalName, internalSetNamespace, setLocalNamepublic String getAttributeValue()
getAttributeValue in interface org.apache.axiom.om.OMAttributepublic void setAttributeValue(String value)
setAttributeValue in interface org.apache.axiom.om.OMAttributevalue - public String getAttributeType()
getAttributeType in interface org.apache.axiom.om.OMAttributepublic void setAttributeType(String type)
setAttributeType in interface org.apache.axiom.om.OMAttributetype - public String getNamespaceURI()
getNamespaceURI in interface org.apache.axiom.om.OMNamedInformationItempublic org.apache.axiom.om.OMFactory getOMFactory()
getOMFactory in interface org.apache.axiom.om.OMInformationItempublic boolean equals(Object obj)
OMAttribute instances. Thus the object to compare
this with may be an instance of OMAttributeImpl (an instance of this class) or
an instance of AttrImpl. The method returns false for any object of type other
than OMAttribute.
We check for the equality of namespaces first (note that if the namespace of this instance is null
then for the obj to be equal its namespace must also be null). This condition solely
doesn't determine the equality. So we check for the equality of names and values (note that the value
can also be null in which case the same argument holds as that for the namespace) of the two instances.
If all three conditions are met then we say the two instances are equal.
Note: We ignore the owner when checking for the equality. This is simply because the owner is
introduced just to keep things simple for the programmer and not as part of an attribute itself.
public org.apache.axiom.om.OMInformationItem clone(org.apache.axiom.om.OMCloneOptions options)
clone in interface org.apache.axiom.om.OMInformationItemCopyright ? The Apache Software Foundation. All Rights Reserved.