public void addConfigurationAtFront(AbstractConfiguration config, String name) { addConfigurationAtIndex(config, name, 0); }
public void addConfigurationAtFront(AbstractConfiguration config, String name) { addConfigurationAtIndex(config, name, 0); }
/** * Adds a new child configuration to this configuration with an optional * name. The configuration will be added to the end of the list * if <em>container configuration</em> has been changed to new one or no longer at the end of * the list. Otherwise it will be added in front of the <em>container configuration</em>. * * @param config the configuration to add (must not be <b>null</b>) * @param name the name of this configuration (can be <b>null</b>) */ public void addConfiguration(AbstractConfiguration config, String name) { if (containerConfigurationChanged) { addConfigurationAtIndex(config, name, configList.size()); } else { addConfigurationAtIndex(config, name, configList.indexOf(containerConfiguration)); } }
/** * Adds a new child configuration to this configuration with an optional * name. The configuration will be added to the end of the list * if <em>container configuration</em> has been changed to new one or no longer at the end of * the list. Otherwise it will be added in front of the <em>container configuration</em>. * * @param config the configuration to add (must not be <b>null</b>) * @param name the name of this configuration (can be <b>null</b>) */ public void addConfiguration(AbstractConfiguration config, String name) { if (containerConfigurationChanged) { addConfigurationAtIndex(config, name, configList.size()); } else { addConfigurationAtIndex(config, name, configList.indexOf(containerConfiguration)); } }
/** * Adds a child configuration and makes it the <em>container * configuration</em>. This means that all future property write operations * are executed on this configuration. Note that the current container * configuration stays in the list of child configurations * at its current position, but it passes its role as container * configuration to the new one. * * @param config the configuration to be added * @param name the name of the configuration to be added * @param index index to add this configuration * * @throws IndexOutOfBoundsException */ public void setContainerConfiguration(AbstractConfiguration config, String name, int index) throws IndexOutOfBoundsException { if (!configList.contains(config)) { checkIndex(index); containerConfigurationChanged = true; containerConfiguration = config; addConfigurationAtIndex(config, name, index); } else { logger.warn(config + " is not added as it already exits"); } }
/** * Adds a child configuration and makes it the <em>container * configuration</em>. This means that all future property write operations * are executed on this configuration. Note that the current container * configuration stays in the list of child configurations * at its current position, but it passes its role as container * configuration to the new one. * * @param config the configuration to be added * @param name the name of the configuration to be added * @param index index to add this configuration * * @throws IndexOutOfBoundsException */ public void setContainerConfiguration(AbstractConfiguration config, String name, int index) throws IndexOutOfBoundsException { if (!configList.contains(config)) { checkIndex(index); containerConfigurationChanged = true; containerConfiguration = config; addConfigurationAtIndex(config, name, index); } else { logger.warn(config + " is not added as it already exits"); } }