public abstract class

AbstractElementList

extends AbstractConfigurationElement
java.lang.Object
   ↳ com.microstrategy.utils.config.AbstractConfigurationElement
     ↳ com.microstrategy.utils.config.AbstractElementList
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This is the base class for nodes that represents a list in a configuration file. Subclasses need to override the getListClass() and getListNodeName() for this class to automatically identify the children's name and class.

Summary

[Expand]
Inherited Constants
From class com.microstrategy.utils.config.AbstractConfigurationElement
Public Constructors
AbstractElementList()
Public Methods
void clear()
Removes all child elements from this list.
boolean containsKey(Object key)
Returns true if the object with the given key is part of this list.
ConfigurationElement get(int index)
Returns the ConfigurationElement in the index position.
ConfigurationElement get(Object key)
Returns the ConfigurationElement in the index position.
boolean isEmpty()
Returns true if this list contains no configuration elements.
ConfigurationElement put(ConfigurationElement child)
Adds the specified ConfigurationElement to the list.
ConfigurationElement put(Object key, ConfigurationElement child)
Associates the specified value with the specified key in this list.
int size()
Retuns the number of currently available items.
Protected Methods
String getKeyAttribute()
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.
AbstractConfigurationElement.FilteredList getList()
Returns the ImplicitList associated with this list's node name
abstract Class getListClass()
Returns the Class items beloging to this list will be instance of.
abstract String getListNodeName()
Returns the name of the node representing children of this list.
[Expand]
Inherited Methods
From class com.microstrategy.utils.config.AbstractConfigurationElement
From class java.lang.Object
From interface com.microstrategy.utils.config.ConfigurationElement
From interface com.microstrategy.utils.config.ConfigurationFile

Public Constructors

public AbstractElementList ()

Public Methods

public void clear ()

Removes all child elements from this list.

public boolean containsKey (Object key)

Returns true if the object with the given key is part of this list.

public ConfigurationElement get (int index)

Returns the ConfigurationElement in the index position. Elements that have been deleted are not considered part of the list.

public ConfigurationElement get (Object key)

Returns the ConfigurationElement in the index position. Elements that have been deleted are not considered part of the list.

public boolean isEmpty ()

Returns true if this list contains no configuration elements.

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.

public ConfigurationElement put (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.

public int size ()

Retuns the number of currently available items. This size doesn not include elements that have been removed.

Protected Methods

protected String getKeyAttribute ()

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.

protected AbstractConfigurationElement.FilteredList getList ()

Returns the ImplicitList associated with this list's node name

protected abstract Class getListClass ()

Returns the Class items beloging to this list will be instance of.

protected abstract String getListNodeName ()

Returns the name of the node representing children of this list.