Class AbstractAttributeCollection

    • Constructor Detail

      • AbstractAttributeCollection

        public AbstractAttributeCollection()
    • Method Detail

      • isEventFirable

        @Pure
        public boolean isEventFirable()
        Description copied from interface: AttributeCollection
        Replies if the events are fired by this container.
        Specified by:
        isEventFirable in interface AttributeCollection
        Returns:
        true if the events are fired; otherwise false if events are not fired.
      • setEventFirable

        public void setEventFirable​(boolean isFirable)
        Description copied from interface: AttributeCollection
        Set if the events are fired by this container.
        Specified by:
        setEventFirable in interface AttributeCollection
        Parameters:
        isFirable - is true if the events are fired; otherwise false if events are not fired.
      • fireAttributeAddedEvent

        protected void fireAttributeAddedEvent​(String name,
                                               AttributeValue attr)
        Fire the addition event.
        Parameters:
        name - is the name of the attribute for which the event occured.
        attr - is the value of the attribute.
      • fireAttributeChangedEvent

        protected void fireAttributeChangedEvent​(String name,
                                                 AttributeValue oldValue,
                                                 AttributeValue currentValue)
        Fire the attribute change event.
        Parameters:
        name - is the name of the attribute for which the event occured.
        oldValue - is the previous value of the attribute
        currentValue - is the current value of the attribute
      • fireAttributeClearedEvent

        protected void fireAttributeClearedEvent()
        Fire the all attribute removal event.
      • fireAttributeRemovedEvent

        protected void fireAttributeRemovedEvent​(String name,
                                                 AttributeValue oldValue)
        Fire the an attribute removal event.
        Parameters:
        name - is the name of the attribute for which the event occured.
        oldValue - is the previous value of the attribute
      • fireAttributeRenamedEvent

        protected void fireAttributeRenamedEvent​(String oldName,
                                                 String newName,
                                                 AttributeValue attr)
        Fire the renaming event.
        Parameters:
        oldName - is the previous name of the attribute (before renaming)
        newName - is the new name of the attribute (after renaming)
        attr - is the value of the attribute.
      • renameAttribute

        public final boolean renameAttribute​(String oldname,
                                             String newname)
        Description copied from interface: AttributeCollection
        Rename the attribute.

        If a attribute named newname already exists, this function will reply false.

        This function is equivalent to renameAttribute(oldname, newname, false).

        Specified by:
        renameAttribute in interface AttributeCollection
        Parameters:
        oldname - is the name of the attribute to rename.
        newname - is the new name of the attribute.
        Returns:
        false if something wrong appends