Class Element.ElementDictionary

  • All Implemented Interfaces:
    Dictionary<java.lang.String,​java.lang.String>
    Enclosing class:
    Element

    public final class Element.ElementDictionary
    extends java.lang.Object
    implements Dictionary<java.lang.String,​java.lang.String>
    Dictionary representing the attributes declared by this element.
    • Method Detail

      • get

        public java.lang.String get​(java.lang.String attributeName)
        Returns an attribute value.
        Specified by:
        get in interface Dictionary<java.lang.String,​java.lang.String>
        Parameters:
        attributeName - Name of the attribute whose value we are interested in.
        Returns:
        The value associated with the given attribute, or null
      • put

        public java.lang.String put​(java.lang.String attributeName,
                                    java.lang.String value)
        Sets an attribute value.
        Specified by:
        put in interface Dictionary<java.lang.String,​java.lang.String>
        Parameters:
        attributeName - The attribute to set the new value for.
        value - New value for this attribute.
        Returns:
        The value previously associated with the given attribute, or null if the attribute did not previously exist.
      • remove

        public java.lang.String remove​(java.lang.String attributeName)
        Removes an attribute.
        Specified by:
        remove in interface Dictionary<java.lang.String,​java.lang.String>
        Parameters:
        attributeName - Name of the attribute to remove.
        Returns:
        The value previously associated with the given attribute, or null if the attribute did not exist.
      • containsKey

        public boolean containsKey​(java.lang.String attributeName)
        Tests for the existence of an attribute.
        Specified by:
        containsKey in interface Dictionary<java.lang.String,​java.lang.String>
        Parameters:
        attributeName - Name of the attribute to test for.
        Returns:
        true if this element defines the given attribute; false otherwise.