Package org.apache.pivot.xml
Class Element.Attribute
- java.lang.Object
-
- org.apache.pivot.xml.Element.Attribute
-
- Enclosing class:
- Element
public static class Element.Attribute extends java.lang.Object
Class representing an XML attribute.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Element
getElement()
Returns the element to which this attribute belongs.java.lang.String
getLocalName()
java.lang.String
getName()
Returns the fully-qualified name of the attribute.java.lang.String
getNamespacePrefix()
Returns the attribute's namespace prefix.java.lang.String
getValue()
int
hashCode()
void
setValue(java.lang.String value)
Sets the attribute's value.java.lang.String
toString()
-
-
-
Method Detail
-
getElement
public Element getElement()
Returns the element to which this attribute belongs.- Returns:
- This attribute's element, or
null
if the attribute does not belong to an element.
-
getNamespacePrefix
public java.lang.String getNamespacePrefix()
Returns the attribute's namespace prefix.- Returns:
- The attribute's namespace prefix, or
null
if the attribute belongs to the default namespace.
-
getLocalName
public java.lang.String getLocalName()
- Returns:
- The attribute's local name.
-
getName
public java.lang.String getName()
Returns the fully-qualified name of the attribute.- Returns:
- The local name if there is no namespace defined, or the fully-qualified name if there is a namespace.
-
getValue
public java.lang.String getValue()
- Returns:
- The attribute's value.
-
setValue
public void setValue(java.lang.String value)
Sets the attribute's value.- Parameters:
value
- New value for this attribute.- Throws:
java.lang.IllegalArgumentException
- if the value isnull
.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-