Class Attributes


  • public class Attributes
    extends java.lang.Object
    A list of Tag's attributes.
    • Constructor Summary

      Constructors 
      Constructor Description
      Attributes()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Attribute attr)
      Adds an attribute to the list.
      Attribute get​(int index)
      Gets one of the attributes from the list.
      java.lang.String getValueByName​(java.lang.String attrName)
      Find attribute value by name.
      int size()
      Number of attributes.
      java.lang.String toString()
      Returns a string representation of the list of attributes.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Attributes

        public Attributes()
    • Method Detail

      • size

        public int size()
        Number of attributes.
      • add

        public void add​(Attribute attr)
        Adds an attribute to the list.
      • get

        public Attribute get​(int index)
        Gets one of the attributes from the list.
      • getValueByName

        public java.lang.String getValueByName​(java.lang.String attrName)
        Find attribute value by name.
        Parameters:
        attrName - attribute name, case insensitive
        Returns:
        attribute value, or null if not found
      • toString

        public java.lang.String toString()
        Returns a string representation of the list of attributes. ' name1="value1" name2="value2" ...'
        Overrides:
        toString in class java.lang.Object