public class PropertyValueBuilder extends Object
PropertyValue instance.| Constructor and Description |
|---|
PropertyValueBuilder(String key,
String value,
String source)
Create a new builder instance, for a given set of parameters.
|
| Modifier and Type | Method and Description |
|---|---|
PropertyValueBuilder |
addContextData(String key,
Object value)
Add an additional context data information.
|
PropertyValue |
build()
Creates a new immutable
PropertyValue. |
PropertyValueBuilder |
setContextData(Map<String,String> contextData)
Replaces/sets the context data.
|
String |
toString() |
public PropertyValueBuilder(String key, String value, String source)
key - to access a property value.value - the value, not null. If a value is null PropertySource.get(String) should return
null.source - property source.public PropertyValueBuilder setContextData(Map<String,String> contextData)
contextData - the context data to be applied, not null. Note that all keys should only identify the context
data item. the builder does create a corresponding metadata entry, e.g.
provider=myProviderName
ttl=250
creationIndex=1
modificationIndex=23
will be mapped, given a key test.env.name to
_test.env.name.provider=myProviderName
_test.env.name.ttl=250
_test.env.name.creationIndex=1
_test.env.name.modificationIndex=23
public PropertyValueBuilder addContextData(String key, Object value)
key - the context data key, not null.value - the context value, not null (will be converted to String).public PropertyValue build()
PropertyValue.PropertyValue, never null.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.