Class WithAttributes

    • Field Detail

      • attr

        public java.util.Map<java.lang.String,​java.lang.Object> attr
        The "attr" hash is used to store the XML payload (not only XML attributes!)
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.String key)
        Returns the Object value to which the specified key is mapped, or null if this map contains no mapping for the key.
        Specified by:
        get in interface IWithAttributes
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value
      • getString

        public java.lang.String getString​(java.lang.String key)
        Returns the String value to which the specified key is mapped, or null if this map contains no String mapping for the key.
        Specified by:
        getString in interface IWithAttributes
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the String value to which the specified key is mapped, or null if this map contains no String mapping for the key
      • getCollection

        public <T> java.util.Collection<T> getCollection​(java.lang.String key)
        Returns the Collection value to which the specified key is mapped, or null if this map contains no Collection mapping for the key.
        Specified by:
        getCollection in interface IWithAttributes
        Type Parameters:
        T - type of items
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the Collection value to which the specified key is mapped, or null if this map contains no Collection mapping for the key
        Since:
        5502
      • put

        public void put​(java.lang.String key,
                        java.lang.Object value)
        Put a key / value pair as a new attribute. Overrides key / value pair with the same key (if present).
        Specified by:
        put in interface IWithAttributes
        Parameters:
        key - the key
        value - the value
      • 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