/** * Add the given property source at a particular index in the list. */ private void addAtIndex(int index, PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(index, propertySource); }
/** * Add the given property source object with lowest precedence. */ public void addLast(PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(propertySource); }
/** * Add the given property source object with highest precedence. */ public void addFirst(PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(0, propertySource); }
/** * Add the given property source at a particular index in the list. */ private void addAtIndex(int index, PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(index, propertySource); }
/** * Add the given property source object with highest precedence. */ public void addFirst(PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(0, propertySource); }
/** * Add the given property source object with lowest precedence. */ public void addLast(PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(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); }
/** * Add the given property source at a particular index in the list. */ private void addAtIndex(int index, PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(index, propertySource); }
/** * Add the given property source object with highest precedence. */ public void addFirst(PropertySource<?> propertySource) { logger.debug(String.format("Adding [%s] PropertySource with highest search precedence", propertySource.getName())); removeIfPresent(propertySource); this.propertySourceList.addFirst(propertySource); }
/** * Add the given property source object with lowest precedence. */ public void addLast(PropertySource<?> propertySource) { logger.debug(String.format("Adding [%s] PropertySource with lowest search precedence", propertySource.getName())); removeIfPresent(propertySource); this.propertySourceList.addLast(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); }
/** * Add the given property source object with highest precedence. */ public void addFirst(PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(0, propertySource); }
/** * Add the given property source object with highest precedence. */ public void addFirst(PropertySource<?> propertySource) { removeIfPresent(propertySource); this.propertySourceList.add(0, 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); }