Class AbstractElementList

    • Constructor Detail

      • AbstractElementList

        public AbstractElementList()
    • Method Detail

      • getKeyAttribute

        protected java.lang.String getKeyAttribute()
        Description copied from class: AbstractConfigurationElement
        This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
        Specified by:
        getKeyAttribute in class AbstractConfigurationElement
      • getListClass

        protected abstract java.lang.Class getListClass()
        Returns the Class items beloging to this list will be instance of.
      • getListNodeName

        protected abstract java.lang.String getListNodeName()
        Returns the name of the node representing children of this list.
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Returns true if the object with the given key is part of this list.
      • size

        public int size()
        Retuns the number of currently available items. This size doesn not include elements that have been removed.
      • isEmpty

        public boolean isEmpty()
        Returns true if this list contains no configuration elements.
      • get

        public ConfigurationElement get​(int index)
        Returns the ConfigurationElement in the index position. Elements that have been deleted are not considered part of the list.
      • get

        public ConfigurationElement get​(java.lang.Object key)
        Returns the ConfigurationElement in the index position. Elements that have been deleted are not considered part of the list.
      • put

        public ConfigurationElement put​(java.lang.Object key,
                                        ConfigurationElement child)
        Associates the specified value with the specified key in this list. If the list previously contained a value for this key, the old value is replaced.
        Parameters:
        key - key with which the specified value is to be associated.
        child - value to be associated with the specified key.
        Returns:
        previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the HashMap previously associated null with the specified key.
      • put

        public ConfigurationElement put​(ConfigurationElement child)
        Adds the specified ConfigurationElement to the list. The key to used is automatically retrieved from the element itself. If the list previously contained a value for this key, the old value is replaced.
        Parameters:
        child - value to be associated with the specified key.
        Returns:
        previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the HashMap previously associated null with the specified key.
      • clear

        public void clear()
        Removes all child elements from this list.