Class AbstractConfigurationElementList

    • Field Detail

      • ATT_VERSION

        public static final java.lang.String ATT_VERSION
        Version attribute
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractConfigurationElementList

        public AbstractConfigurationElementList()
      • AbstractConfigurationElementList

        public AbstractConfigurationElementList​(org.w3c.dom.Node root)
      • AbstractConfigurationElementList

        public AbstractConfigurationElementList​(org.w3c.dom.Document doc)
    • Method Detail

      • put

        public void put​(java.lang.Object key,
                        ConfigurationElement element)
        Add an element to the collection
        Specified by:
        put in interface ConfigurationElementList
        Parameters:
        key - the key of the object
        element - the configelement to add
      • put

        public void put​(ConfigurationElement element)
        Add an element to the collection without providing a key
        Parameters:
        element - the configelement to add
      • remove

        public ConfigurationElement remove​(java.lang.Object key)
        Removes an element from the collection
        Specified by:
        remove in interface ConfigurationElementList
        Parameters:
        key - the key of the object to remove
        Returns:
        the ConfigurationElement object removed from the collection
      • size

        public int size()
        Retuns the size of the collection
        Specified by:
        size in interface ConfigurationElementList
        Returns:
        the size of the collection
      • isEmpty

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

        public java.lang.Object getKey​(int index)
        Specified by:
        getKey in interface ConfigurationElementList
        Parameters:
        index - the index of the requested Object
        Returns:
        the key ob the object in index
      • getValues

        public java.util.Enumeration getValues()
        Deprecated.
        It's not recommended to use this method. Instead you can just iterator through the elements of this object.
        Specified by:
        getValues in interface ConfigurationElementList
        Returns:
        an enumeration of the values currently in the collection
      • getVersion

        public java.lang.String getVersion()
        Returns the version of the configuration file
        Returns:
        the version of the configuration file
      • setVersion

        public void setVersion​(java.lang.String version)
        Sets the version of the configuration file
        Parameters:
        version - the version of the configuration file
      • init

        protected void init​(org.w3c.dom.Node root)
        Initializes the list by extracting the xml version of the node and initializing the node from a file if the node inidcates so.
        Parameters:
        root - Node instance where the information for initializing this instance is defined.
      • registerElementInList

        protected void registerElementInList​(java.lang.String nodeName,
                                             java.lang.Class cls)
        Register element to the list. Class extends this class should use this method to register the element that will be put in the list.
        Parameters:
        nodeName - The node name of the in-list element
        cls - The class of the in-list element
      • getList

        public HashList getList()
        Returns the collection of elements that are in the list. The list is filtered to include only non-deleted items.
      • 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
      • sort

        public void sort​(java.util.Comparator comp)
        Sorts the existing list according to the order induced by the specified comparator.