Class IndexedAttributeHolder

    • Method Detail

      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String name)
        Return an object based on a name.
        Specified by:
        getAttribute in interface AttributeHolder
        Parameters:
        name - - name of an attribute
        Returns:
        - attribute value for the name, null if name does not exist in attributes
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String name,
                                             java.util.function.Supplier initializer)
        Return an object based on a name.
        Specified by:
        getAttribute in interface AttributeHolder
        Parameters:
        name - - name of an attribute
        initializer - the initializer to be used to assign a default attribute value, in case it hasn't been assigned
        Returns:
        - attribute value for the name, null if name does not exist in attributes
      • setAttribute

        public void setAttribute​(java.lang.String name,
                                 java.lang.Object value)
        Set a name/value object.
        Specified by:
        setAttribute in interface AttributeHolder
        Parameters:
        name - - name of an attribute
        value - - value of named attribute
      • removeAttribute

        public java.lang.Object removeAttribute​(java.lang.String name)
        Remove a name/value object.
        Specified by:
        removeAttribute in interface AttributeHolder
        Parameters:
        name - - name of an attribute
        Returns:
        attribute which has been removed
      • getAttributeNames

        public java.util.Set<java.lang.String> getAttributeNames()
        Return a Set of attribute names.
        Specified by:
        getAttributeNames in interface AttributeHolder
        Returns:
        - Set of attribute names
      • recycle

        public void recycle()
        Recycle AttributeHolder
        Specified by:
        recycle in interface AttributeHolder
      • clear

        public void clear()
        Clear all the attributes.
        Specified by:
        clear in interface AttributeHolder