public class SmartMap extends Object implements Map<String,Object>
get(String, Class) and get(String, Object) to make the return values type safe and/or auto-converted.
Also adds set(String, Object) for easier builder-style code.
Returns keys in alphabetical order.| Constructor and Description |
|---|
SmartMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object o) |
Object |
get(Object key) |
<T> T |
get(String key,
Class<T> type)
Return the value for the given key converted to the passed type.
|
<T> T |
get(String key,
T defaultValue)
Return the value for the given key converted to the type of the default value.
|
int |
hashCode() |
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String key,
Object value)
Like normal
Map.put(Object, Object) operation, but if null is passed as "value" it removes the key/value from the map. |
void |
putAll(Map<? extends String,?> m) |
Object |
remove(Object key) |
SmartMap |
set(String key,
Object value)
Works like
put(String, Object) but returns this SmartMap rather than the old value. |
int |
size() |
Collection<Object> |
values() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic boolean containsKey(Object key)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>public <T> T get(String key, Class<T> type)
ObjectUtil.convert(Object, Class).
Any conversion is done only on the return value. The stored value is unchanged.public <T> T get(String key, T defaultValue)
get(String, Class)public Object put(String key, Object value)
Map.put(Object, Object) operation, but if null is passed as "value" it removes the key/value from the map.public SmartMap set(String key, Object value)
put(String, Object) but returns this SmartMap rather than the old value.public boolean equals(Object o)
public int hashCode()
Copyright © 2019 Liquibase.org. All rights reserved.