|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axiom.om.impl.llom.OMAttributeImpl
public class OMAttributeImpl
Class OMAttributeImpl
Field Summary | |
---|---|
protected OMElement |
owner
|
Constructor Summary | |
---|---|
OMAttributeImpl(String localName,
OMNamespace ns,
String value,
OMFactory factory)
Constructor OMAttributeImpl. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Checks for the equality of two OMAttribute instances. |
String |
getAttributeType()
Method getAttributeType. |
String |
getAttributeValue()
Method getAttributeValue. |
String |
getLocalName()
Method getLocalName. |
OMNamespace |
getNamespace()
Method getNamespace. |
OMFactory |
getOMFactory()
Returns the OMFactory that created this object |
OMElement |
getOwner()
Returns the owner element of this attribute |
QName |
getQName()
|
int |
hashCode()
|
void |
setAttributeType(String type)
Method setAttributeType. |
void |
setAttributeValue(String value)
Method setAttributeValue. |
void |
setLocalName(String localName)
Method setLocalName. |
void |
setOMNamespace(OMNamespace omNamespace)
Method setOMNamespace. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OMElement owner
Constructor Detail |
---|
public OMAttributeImpl(String localName, OMNamespace ns, String value, OMFactory factory)
localName
- ns
- value
- Method Detail |
---|
public QName getQName()
getQName
in interface OMAttribute
public String getLocalName()
getLocalName
in interface OMAttribute
public void setLocalName(String localName)
setLocalName
in interface OMAttribute
localName
- public String getAttributeValue()
getAttributeValue
in interface OMAttribute
public void setAttributeValue(String value)
setAttributeValue
in interface OMAttribute
value
- public String getAttributeType()
getAttributeType
in interface OMAttribute
public void setAttributeType(String type)
setAttributeType
in interface OMAttribute
type
- public void setOMNamespace(OMNamespace omNamespace)
setOMNamespace
in interface OMAttribute
omNamespace
- public OMNamespace getNamespace()
getNamespace
in interface OMAttribute
public OMFactory getOMFactory()
OMAttribute
getOMFactory
in interface OMAttribute
public OMElement getOwner()
getOwner
in interface OMAttribute
public 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.
equals
in class Object
obj
- The object to compare with this instance.
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |