Class AbstractConfigurationElementList

    • Field Detail


        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
        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
        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
        key - the key of the object to remove
        the ConfigurationElement object removed from the collection
      • size

        public int size()
        Retuns the size of the collection
        Specified by:
        size in interface ConfigurationElementList
        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
        index - the index of the requested Object
        the key ob the object in index
      • getValues

        public java.util.Enumeration getValues()
        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
        an enumeration of the values currently in the collection
      • getVersion

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

        public void setVersion​(java.lang.String version)
        Sets the version of the configuration file
        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.
        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.
        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.