public interface KV extends Map<String,ValueObject>
A instance of KV is a Map with ValueObject indexed with String
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getValue(String key)
Returns a decoded value by key
|
KV |
putValue(String key,
Object val)
Add an new pair (key, val) into the store.
|
KV |
putValues(Map<String,Object> kvMap)
Put all (key, value) pair from an normal map into this KV map.
|
Map<String,Object> |
toMap()
Returns a
Map contains (key, value) pairs that stored in this KV map. |
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesKV putValue(String key, Object val)
Add an new pair (key, val) into the store.
key - the keyval - the Object typed value (instead of encoded ValueObject type)<T> T getValue(String key)
Returns a decoded value by key
T - the generic type of the valuekey - the key index the value objectKV putValues(Map<String,Object> kvMap)
Put all (key, value) pair from an normal map into this KV map. Note the original map contains String typed key and Object typed value. After they have been put into this KV map. The original value will be encoded by ValueObject
kvMap - the original mapMap<String,Object> toMap()
Returns a Map contains (key, value) pairs that stored in this KV map. The value in the pair should be the ValueObject.value() stored in the ValueObject in this KV map
Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.