public class DynamicPropertiesContainer extends Object implements DynamicProperties
| Constructor and Description |
|---|
DynamicPropertiesContainer() |
DynamicPropertiesContainer(Map<String,Object> map) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
asMap() |
DynamicProperties |
createFrom(Map<String,Object> map)
Creates a new instance with the properties set from the given map with
DynamicProperties.setPropertiesFrom(Map) |
Object |
getProperty(String key) |
Object |
getProperty(String key,
Object defaultValue) |
Iterable<String> |
getPropertyKeys()
Returns all keys
|
boolean |
hasProperty(String key) |
boolean |
isDirty() |
Object |
removeProperty(String key)
Removes the property with the given key
|
void |
setDirty(boolean dirty) |
void |
setPropertiesFrom(Map<String,Object> m)
Sets a property for all key/value pairs in the given map
|
void |
setProperty(String key,
Object value)
Set the value of the property with the given key to the given value and overwrites it when such a property
already exists.
|
public boolean hasProperty(String key)
hasProperty in interface DynamicPropertieskey - the key to be checkedpublic Object getProperty(String key)
getProperty in interface DynamicPropertieskey - key of the property to getDynamicProperties.hasProperty(java.lang.String)
returns falsepublic Object getProperty(String key, Object defaultValue)
getProperty in interface DynamicPropertieskey - key of the property to getdefaultValue - the default value to return if no property with the given key existsDynamicProperties.hasProperty(java.lang.String)
returns falsepublic void setProperty(String key, Object value)
DynamicPropertiessetProperty in interface DynamicPropertieskey - key of the propertyvalue - value of the propertypublic Object removeProperty(String key)
DynamicPropertiesremoveProperty in interface DynamicPropertiesDynamicProperties.hasProperty(java.lang.String) returns
falsepublic Iterable<String> getPropertyKeys()
DynamicPropertiesgetPropertyKeys in interface DynamicPropertiespublic Map<String,Object> asMap()
asMap in interface DynamicPropertiespublic void setPropertiesFrom(Map<String,Object> m)
DynamicPropertiessetPropertiesFrom in interface DynamicPropertiesm - that contains the key/value pairs to setpublic DynamicProperties createFrom(Map<String,Object> map)
DynamicPropertiesDynamicProperties.setPropertiesFrom(Map)createFrom in interface DynamicPropertiesmap - that contains the key/value pairs to setpublic boolean isDirty()
isDirty in interface DirtyValuepublic void setDirty(boolean dirty)
setDirty in interface DirtyValueCopyright © 2011-2013-2013 Pivotal. All Rights Reserved.