public abstract class XAttributeImpl extends java.lang.Object implements XAttribute
Modifier | Constructor and Description |
---|---|
protected |
XAttributeImpl(java.lang.String key)
Creates a new, empty attribute.
|
protected |
XAttributeImpl(java.lang.String key,
XExtension extension)
Creates a new attribute.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Attributes must be cloneable.
|
int |
compareTo(XAttribute o) |
boolean |
equals(java.lang.Object obj) |
XAttributeMap |
getAttributes()
Retrieves the attributes set for this element.
|
XExtension |
getExtension()
Retrieves the extension defining this attribute.
|
java.util.Set<XExtension> |
getExtensions()
Retrieves the extensions used by this element, i.e.
|
java.lang.String |
getKey()
Retrieves the key, i.e.
|
boolean |
hasAttributes()
Checks for the existence of attributes.
|
int |
hashCode() |
void |
setAttributes(XAttributeMap attributes)
Sets the map of attributes for this element.
|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
accept, toString
protected XAttributeImpl(java.lang.String key)
key
- The key, i.e. unique name identifier, of this attribute.protected XAttributeImpl(java.lang.String key, XExtension extension)
key
- The key, i.e. unique name identifier, of this attribute.extension
- The extension used for defining this attribute.public java.lang.String getKey()
XAttribute
getKey
in interface XAttribute
public XExtension getExtension()
XAttribute
getExtension
in interface XAttribute
null
, if there is no extension
defining this attribute.public XAttributeMap getAttributes()
XAttributable
getAttributes
in interface XAttributable
public void setAttributes(XAttributeMap attributes)
XAttributable
setAttributes
in interface XAttributable
attributes
- A map of attributes.public boolean hasAttributes()
XAttributable
XAttributable.getAttributes()
in certain situations.hasAttributes
in interface XAttributable
public java.util.Set<XExtension> getExtensions()
XAttributable
getExtensions
in interface XAttributable
public java.lang.Object clone()
XAttribute
clone
in interface XAttribute
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(XAttribute o)
compareTo
in interface java.lang.Comparable<XAttribute>