Class AttributeSet

    • Method Detail

      • getKlass

        public java.lang.Class<?> getKlass()
      • getName

        public java.lang.String getName()
      • contains

        public boolean contains​(java.lang.String name)
        Returns whether this attribute set contains the specified named attribute
        Parameters:
        name - the name of the attribute
      • attribute

        public <T> Attribute<T> attribute​(java.lang.String name)
        Returns the named attribute
        Parameters:
        name - the name of the attribute to return
        Returns:
        the attribute
      • read

        public void read​(AttributeSet other)
        Copies all attribute from another AttributeSet
        Parameters:
        other - the source AttributeSet
      • protect

        public AttributeSet protect()
        Returns a new ValueSet where immutable Attributes are write-protected
        Returns:
      • isModified

        public boolean isModified()
        Returns whether any attributes in this set have been modified
      • isProtected

        public boolean isProtected()
        Returns whether this attribute set is protected
      • write

        public void write​(javax.xml.stream.XMLStreamWriter writer,
                          AttributeDefinition<?> def)
                   throws javax.xml.stream.XMLStreamException
        Writer a single attribute to the specified XMLStreamWriter using the attribute's xmlName
        Parameters:
        writer - the writer
        def - the Attribute definition
        Throws:
        javax.xml.stream.XMLStreamException
      • write

        public void write​(javax.xml.stream.XMLStreamWriter writer,
                          AttributeDefinition<?> def,
                          java.lang.Enum<?> name)
                   throws javax.xml.stream.XMLStreamException
        Writer a single attribute to the specified XMLStreamWriter using the supplied name
        Parameters:
        writer - the writer
        def - the Attribute definition
        name - the XML tag name for the attribute
        Throws:
        javax.xml.stream.XMLStreamException
      • write

        public void write​(javax.xml.stream.XMLStreamWriter writer,
                          AttributeDefinition<?> def,
                          java.lang.String name)
                   throws javax.xml.stream.XMLStreamException
        Writer a single attribute to the specified XMLStreamWriter using the supplied name
        Parameters:
        writer - the writer
        def - the Attribute definition
        name - the XML tag name for the attribute
        Throws:
        javax.xml.stream.XMLStreamException
      • write

        public void write​(javax.xml.stream.XMLStreamWriter writer,
                          java.lang.String xmlElementName)
                   throws javax.xml.stream.XMLStreamException
        Writes this attributeset to the specified XMLStreamWriter as an element
        Parameters:
        writer -
        Throws:
        javax.xml.stream.XMLStreamException
      • write

        public void write​(javax.xml.stream.XMLStreamWriter writer,
                          java.lang.String xmlElementName,
                          AttributeDefinition<?>... defs)
                   throws javax.xml.stream.XMLStreamException
        Writes the specified attributes in this attributeset to the specified XMLStreamWriter as an element
        Parameters:
        writer -
        Throws:
        javax.xml.stream.XMLStreamException
      • write

        public void write​(javax.xml.stream.XMLStreamWriter writer)
                   throws javax.xml.stream.XMLStreamException
        Writes the attributes of this attributeset as part of the current element
        Parameters:
        writer -
        Throws:
        javax.xml.stream.XMLStreamException
      • hashCode

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(java.lang.String name)
      • reset

        public void reset()
      • attributes

        public java.util.Collection<Attribute<?>> attributes()