public class KVStore extends HashMap<String,ValueObject> implements KV
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
KVStore()
Create an empty
KVStore |
KVStore(KVStore copy)
Create a
KVStore by coping another KVStore |
KVStore(Map<String,Object> values)
Create a
KVStore with a (String, Object) map |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getValue(String key)
Get
value object value by key from the
store. |
KVStore |
putValue(String key,
Object val)
Put a simple data into the store with a key.
|
KVStore |
putValues(Map<String,Object> kvMap)
Put a map of (key, value) pair into the store.
|
Map<String,Object> |
toMap()
Returns a `Map` contains (key, value) pairs that stored in this
`KVStore`.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic KVStore()
KVStorepublic KVStore(KVStore copy)
KVStore by coping another KVStorecopy - the KVStore in which all (K,V) pairs will be copied into the new KVStore instancepublic KVStore putValue(String key, Object val)
ValueObjectputValue in interface KVkey - the keyval - the valueValueObjectpublic <T> T getValue(String key)
value object value by key from the
store.getValue in interface KVT - the generic type of the return valuekey - the keyValueObject.value()public KVStore putValues(Map<String,Object> kvMap)
ValueObjectpublic Map<String,Object> toMap()
ValueObject.value()
stored in the ValueObject in this `KVStore`Copyright © 2017. All Rights Reserved.