|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<String,String>
org.rhq.test.TokenReplacingProperties
public class TokenReplacingProperties
This map is basically an extension of the 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.).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
TokenReplacingProperties(Map<String,String> wrapped)
|
|
TokenReplacingProperties(Properties properties)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.util.HashMap |
|---|
clone, isEmpty |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public TokenReplacingProperties(Map<String,String> wrapped)
public TokenReplacingProperties(Properties properties)
| Method Detail |
|---|
public String get(Object key)
get in interface Map<String,String>get in class HashMap<String,String>public String getRaw(Object key)
public String put(String key,
String value)
put in interface Map<String,String>put in class HashMap<String,String>public void putAll(Map<? extends String,? extends String> m)
putAll in interface Map<String,String>putAll in class HashMap<String,String>public void putAll(Properties properties)
public void clear()
clear in interface Map<String,String>clear in class HashMap<String,String>public boolean containsKey(Object key)
containsKey in interface Map<String,String>containsKey in class HashMap<String,String>public Set<String> keySet()
keySet in interface Map<String,String>keySet 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.
entrySet in interface Map<String,String>entrySet in class HashMap<String,String>public Set<Map.Entry<String,String>> getRawEntrySet()
public String remove(Object key)
remove in interface Map<String,String>remove in class HashMap<String,String>public int size()
size in interface Map<String,String>size in class HashMap<String,String>public Collection<String> values()
values in interface Map<String,String>values in class HashMap<String,String>public Collection<String> getRawValues()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||