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.ObjectClass representing an XML attribute.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)ElementgetElement()Returns the element to which this attribute belongs.java.lang.StringgetLocalName()java.lang.StringgetName()Returns the fully-qualified name of the attribute.java.lang.StringgetNamespacePrefix()Returns the attribute's namespace prefix.java.lang.StringgetValue()inthashCode()voidsetValue(java.lang.String value)Sets the attribute's value.java.lang.StringtoString()
-
-
-
Method Detail
-
getElement
public Element getElement()
Returns the element to which this attribute belongs.- Returns:
- This attribute's element, or
nullif 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
nullif 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-