Class XAttributeImpl

    • Constructor Detail

      • XAttributeImpl

        protected XAttributeImpl​(java.lang.String key)
        Creates a new, empty attribute.
        Parameters:
        key - The key, i.e. unique name identifier, of this attribute.
      • XAttributeImpl

        protected XAttributeImpl​(java.lang.String key,
                                 XExtension extension)
        Creates a new attribute.
        Parameters:
        key - The key, i.e. unique name identifier, of this attribute.
        extension - The extension used for defining this attribute.
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Description copied from interface: XAttribute
        Retrieves the key, i.e. unique identifier, of this attribute.
        Specified by:
        getKey in interface XAttribute
        Returns:
        The key of this attribute, as a string.
      • getExtension

        public XExtension getExtension()
        Description copied from interface: XAttribute
        Retrieves the extension defining this attribute.
        Specified by:
        getExtension in interface XAttribute
        Returns:
        The extension of this attribute. May return null, if there is no extension defining this attribute.
      • setAttributes

        public void setAttributes​(XAttributeMap attributes)
        Description copied from interface: XAttributable
        Sets the map of attributes for this element.
        Specified by:
        setAttributes in interface XAttributable
        Parameters:
        attributes - A map of attributes.
      • hasAttributes

        public boolean hasAttributes()
        Description copied from interface: XAttributable
        Checks for the existence of attributes. This method can be a more efficient way of checking for the existance of attributes than using XAttributable.getAttributes() in certain situations.
        Specified by:
        hasAttributes in interface XAttributable
        Returns:
        whether this element has any attributes
      • getExtensions

        public java.util.Set<XExtension> getExtensions()
        Description copied from interface: XAttributable
        Retrieves the extensions used by this element, i.e. the extensions used by all attributes of this element, and the element itself.
        Specified by:
        getExtensions in interface XAttributable
        Returns:
        A set of extensions.
      • clone

        public java.lang.Object clone()
        Description copied from interface: XAttribute
        Attributes must be cloneable.
        Specified by:
        clone in interface XAttribute
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone of this attribute.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(XAttribute o)
        Specified by:
        compareTo in interface java.lang.Comparable<XAttribute>