/** * Replace the property source with the given name with the given property source object. * @param name the name of the property source to find and replace * @param propertySource the replacement property source * @throws IllegalArgumentException if no property source with the given name is present * @see #contains */ public void replace(String name, PropertySource<?> propertySource) { int index = assertPresentAndGetIndex(name); this.propertySourceList.set(index, propertySource); }
/** * Replace the property source with the given name with the given property source object. * @param name the name of the property source to find and replace * @param propertySource the replacement property source * @throws IllegalArgumentException if no property source with the given name is present * @see #contains */ public void replace(String name, PropertySource<?> propertySource) { int index = assertPresentAndGetIndex(name); this.propertySourceList.set(index, propertySource); }
/** * Add the given property source object with precedence immediately higher * than the named relative property source. */ public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index, propertySource); }
/** * Add the given property source object with precedence immediately lower * than the named relative property source. */ public void addAfter(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index + 1, propertySource); }
/** * Add the given property source object with precedence immediately lower * than the named relative property source. */ public void addAfter(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index + 1, propertySource); }
/** * Add the given property source object with precedence immediately higher * than the named relative property source. */ public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index, propertySource); }
/** * Replace the property source with the given name with the given property source object. * @param name the name of the property source to find and replace * @param propertySource the replacement property source * @throws IllegalArgumentException if no property source with the given name is present * @see #contains */ public void replace(String name, PropertySource<?> propertySource) { logger.debug(String.format("Replacing [%s] PropertySource with [%s]", name, propertySource.getName())); int index = assertPresentAndGetIndex(name); this.propertySourceList.set(index, propertySource); }
/** * Add the given property source object with precedence immediately lower than * than the named relative property source. */ public void addAfter(String relativePropertySourceName, PropertySource<?> propertySource) { logger.debug(String.format("Adding [%s] PropertySource with search precedence immediately lower than [%s]", propertySource.getName(), relativePropertySourceName)); assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index + 1, propertySource); }
/** * Add the given property source object with precedence immediately higher * than the named relative property source. */ public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { logger.debug(String.format("Adding [%s] PropertySource with search precedence immediately higher than [%s]", propertySource.getName(), relativePropertySourceName)); assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index, propertySource); }
/** * Replace the property source with the given name with the given property source object. * @param name the name of the property source to find and replace * @param propertySource the replacement property source * @throws IllegalArgumentException if no property source with the given name is present * @see #contains */ public void replace(String name, PropertySource<?> propertySource) { int index = assertPresentAndGetIndex(name); this.propertySourceList.set(index, propertySource); }
/** * Add the given property source object with precedence immediately lower * than the named relative property source. */ public void addAfter(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index + 1, propertySource); }
/** * Add the given property source object with precedence immediately higher * than the named relative property source. */ public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index, propertySource); }
/** * Add the given property source object with precedence immediately lower * than the named relative property source. */ public void addAfter(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index + 1, propertySource); }
/** * Add the given property source object with precedence immediately higher * than the named relative property source. */ public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { assertLegalRelativeAddition(relativePropertySourceName, propertySource); removeIfPresent(propertySource); int index = assertPresentAndGetIndex(relativePropertySourceName); addAtIndex(index, propertySource); }