public class TokenReplacingProperties extends HashMap<String,String>
Properties class that can resolve the references
to values of other keys inside the values.
I.e., if the map is initialized with the following mappings:
name => world
hello => Hello ${name}!
then the call to:
get("hello")
will return:
"Hello world!"
To access and modify the underlying unprocessed values, one can use the "raw" counterparts of the standard
map methods (e.g. instead of get(Object), use getRaw(Object), etc.).
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
TokenReplacingProperties(Map<String,String> wrapped) |
TokenReplacingProperties(Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsRawValue(Object value)
Checks whether this map contains the unprocessed value.
|
boolean |
containsValue(Object value) |
Set<Map.Entry<String,String>> |
entrySet()
The returned set IS NOT backed by this map
(unlike in the default map implementations).
|
String |
get(Object key) |
String |
getRaw(Object key) |
Set<Map.Entry<String,String>> |
getRawEntrySet() |
Collection<String> |
getRawValues() |
Set<String> |
keySet() |
String |
put(String key,
String value) |
void |
putAll(Map<? extends String,? extends String> m) |
void |
putAll(Properties properties) |
String |
remove(Object key) |
int |
size() |
Collection<String> |
values()
Unlike in the default implementation the collection returned
from this method IS NOT backed by this map.
|
equals, hashCode, toStringpublic TokenReplacingProperties(Properties properties)
public void putAll(Properties properties)
public void clear()
public boolean containsKey(Object key)
containsKey in interface Map<String,String>containsKey in class HashMap<String,String>public boolean containsValue(Object value)
containsValue in interface Map<String,String>containsValue in class HashMap<String,String>public boolean containsRawValue(Object value)
value - public Set<Map.Entry<String,String>> entrySet()
The Map.Entry.setValue(Object) method
does modify this map though.
public int size()
public Collection<String> values()
public Collection<String> getRawValues()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.