public class ParamsMap extends Object
Modifier and Type | Class and Description |
---|---|
private class |
ParamsMap.ParamData |
Modifier and Type | Field and Description |
---|---|
private Map<String,ParamsMap.ParamData> |
map |
Constructor and Description |
---|
ParamsMap() |
ParamsMap(Map<String,Object> javaObjectMap) |
ParamsMap(Pair<String,Object>... params) |
ParamsMap(ParamsMap other) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
Object |
getJavaObject(String key) |
<T> T |
getJavaObject(String key,
Class<T> cls)
Returns the value for the key iff it's of type cls or null if there either is no such key or
the value is null.
|
LispObject |
getLispObject(String key) |
boolean |
isDefaulted(String key)
Returns whether a default value was applied to this key.
|
boolean |
isEmpty() |
Set<String> |
keySet() |
Pair<Object,LispObject> |
put(String key,
Object javaObj,
LispObject lispObj,
boolean defaulted) |
Pair<Object,LispObject> |
put(String key,
Pair<Object,LispObject> value,
boolean defaulted) |
Pair<Object,LispObject> |
putJavaObject(String key,
Object javaObject,
boolean defaulted) |
Pair<Object,LispObject> |
putLispObject(String key,
LispObject lispObject,
boolean defaulted) |
void |
remove(String key) |
int |
size() |
String |
toString() |
private Map<String,ParamsMap.ParamData> map
public ParamsMap()
public ParamsMap(ParamsMap other)
public <T> T getJavaObject(String key, Class<T> cls) throws LispException
key
- Name of the parameter to look upcls
- The class the object is expected to beLispException
- if the object isn't of type cls or isn't a string that can be converted to an object of type cls by cls's string constructor.public LispObject getLispObject(String key)
public boolean containsKey(Object key)
public boolean isEmpty()
public Pair<Object,LispObject> put(String key, Pair<Object,LispObject> value, boolean defaulted)
public Pair<Object,LispObject> putJavaObject(String key, Object javaObject, boolean defaulted)
public Pair<Object,LispObject> putLispObject(String key, LispObject lispObject, boolean defaulted)
public Pair<Object,LispObject> put(String key, Object javaObj, LispObject lispObj, boolean defaulted)
public int size()
public boolean isDefaulted(String key)
key
- public void remove(String key)