public interface PropertyValueCombinationPolicy
DEFAULT_OVERRIDING_COLLECTOR
is not matching
the need of the current application, e.g. then entries containing multiple values should be combined to new
values instead of overridden.Modifier and Type | Field and Description |
---|---|
static PropertyValueCombinationPolicy |
DEFAULT_OVERRIDING_COLLECTOR
Default overriding collector, where each existing entry (
current is overridden by a subsequent non-null
entry evaluated by propertySource.get(key) . |
Modifier and Type | Method and Description |
---|---|
String |
collect(String currentValue,
String key,
PropertySource propertySource)
Method that is called for each value evaluated by a PropertySource for the given key.
|
static final PropertyValueCombinationPolicy DEFAULT_OVERRIDING_COLLECTOR
current
is overridden by a subsequent non-null
entry evaluated by propertySource.get(key)
.String collect(String currentValue, String key, PropertySource propertySource)
org.apache.tamaya.Configuration.getXXX
, but also
when the full configuration property map is accessed by calling
Configuration.getProperties()
.currentValue
- the current value, including null.
The collector should either combine the existing value with value from currentValue
or replace the value in currentValue
with valueRead
, hereby returning the
result to be used as new currentValue
.key
- The current key to be evaluated.propertySource
- The PropertySource that may return an value for the given key. The PropertySource given
may be evaluated for additional meta-data, how the given values are to be combined.
Note that the value returned by a PropertySource can be null. In that case
currentValue
should be returned in almost all cases.Copyright © 2014–2015 Apache Software Foundation. All rights reserved.