|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<java.lang.String,java.lang.String>
org.clapper.util.misc.PropertiesMap
public class PropertiesMap
An PropertiesMap provides a thin Map<String,String>
wrapper around a java.util.Properties object, allowing the
Properties object to be used where a type-safe Map is
expected. (One such place is with a
VariableSubstituter class.)
Properties,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
PropertiesMap(java.util.Properties properties)
Construct a map to wrap the specified Properties object. |
|
| Method Summary | |
|---|---|
void |
clear()
Remove all mappings from this map. |
boolean |
containsKey(java.lang.Object key)
Determine whether this map contains a mapping for a given key. |
boolean |
containsValue(java.lang.Object value)
Determine whether this map contains a given value. |
java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> |
entrySet()
Get a set view of the mappings in this map. |
java.lang.String |
get(java.lang.Object key)
Retrieve an object from the map. |
boolean |
isEmpty()
Determine whether this map is empty or not. |
java.util.Set<java.lang.String> |
keySet()
Return a Set view of the keys in the map. |
java.lang.String |
put(java.lang.String key,
java.lang.String value)
Associates the specified value with the specified key in this map. |
java.lang.String |
remove(java.lang.Object key)
Removes the mapping for a key, if there is one. |
int |
size()
Get the number of entries in the map. |
| Methods inherited from class java.util.AbstractMap |
|---|
clone, equals, hashCode, putAll, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesMap(java.util.Properties properties)
properties - the Properties object| Method Detail |
|---|
public void clear()
clear in interface java.util.Map<java.lang.String,java.lang.String>clear in class java.util.AbstractMap<java.lang.String,java.lang.String>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.String,java.lang.String>containsKey in class java.util.AbstractMap<java.lang.String,java.lang.String>key - the key to find
public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.String,java.lang.String>containsValue in class java.util.AbstractMap<java.lang.String,java.lang.String>value - the value to find
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> entrySet()
entrySet in interface java.util.Map<java.lang.String,java.lang.String>entrySet in class java.util.AbstractMap<java.lang.String,java.lang.String>java.lang.UnsupportedOperationException - unconditionallypublic java.lang.String get(java.lang.Object key)
get in interface java.util.Map<java.lang.String,java.lang.String>get in class java.util.AbstractMap<java.lang.String,java.lang.String>key - the object's key in the map. Must be a string.
java.lang.ClassCastException - if key is not a stringpublic boolean isEmpty()
isEmpty in interface java.util.Map<java.lang.String,java.lang.String>isEmpty in class java.util.AbstractMap<java.lang.String,java.lang.String>public java.util.Set<java.lang.String> keySet()
Return a Set view of the keys in the map. The set is partially backed by the map. Changes to the map are not necessarily reflected in the set, and vice-versa. The set does not support element removal.
keySet in interface java.util.Map<java.lang.String,java.lang.String>keySet in class java.util.AbstractMap<java.lang.String,java.lang.String>
public java.lang.String put(java.lang.String key,
java.lang.String value)
put in interface java.util.Map<java.lang.String,java.lang.String>put in class java.util.AbstractMap<java.lang.String,java.lang.String>key - the key with which the specified value is to be associatedvalue - the value to associate with the specified key
public java.lang.String remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.String,java.lang.String>remove in class java.util.AbstractMap<java.lang.String,java.lang.String>key - the key to remove
java.lang.UnsupportedOperationException - unconditionallypublic int size()
size in interface java.util.Map<java.lang.String,java.lang.String>size in class java.util.AbstractMap<java.lang.String,java.lang.String>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||