public class MapProperties
extends java.lang.Object
| Constructor and Description |
|---|
MapProperties()
Creates an empty properties set
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all properties
|
boolean |
containsKey(java.lang.String key) |
java.lang.Object |
get(java.lang.String key) |
<T> T |
get(java.lang.String key,
java.lang.Class<T> clazz)
Returns the object for the given key, casting it to clazz.
|
<T> T |
get(java.lang.String key,
T defaultValue,
java.lang.Class<T> clazz)
Returns the object for the given key, casting it to clazz.
|
java.util.Iterator<java.lang.String> |
getKeys() |
java.util.Iterator<java.lang.Object> |
getValues() |
void |
put(java.lang.String key,
java.lang.Object value) |
void |
putAll(MapProperties properties) |
void |
remove(java.lang.String key) |
public boolean containsKey(java.lang.String key)
key - property namepublic java.lang.Object get(java.lang.String key)
key - property namepublic <T> T get(java.lang.String key,
java.lang.Class<T> clazz)
key - the key of the objectclazz - the class of the objectjava.lang.ClassCastException - if the object with the given key is not of type clazzpublic <T> T get(java.lang.String key,
T defaultValue,
java.lang.Class<T> clazz)
key - the key of the objectdefaultValue - the default valueclazz - the class of the objectjava.lang.ClassCastException - if the object with the given key is not of type clazzpublic void put(java.lang.String key,
java.lang.Object value)
key - property namevalue - value to be inserted or modified (if it already existed)public void putAll(MapProperties properties)
properties - set of properties to be addedpublic void remove(java.lang.String key)
key - property name to be removedpublic void clear()
public java.util.Iterator<java.lang.String> getKeys()
public java.util.Iterator<java.lang.Object> getValues()