public interface AdaptiveMap<T extends AdaptiveMap>
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
asMap()
Returns a Map typed object backed by this active record
|
boolean |
containsKey(String key)
Check if the active records has a value associated with key specified
|
Set<Map.Entry<String,Object>> |
entrySet()
Returns a set of entries stored in the active record
|
Set<Map.Entry<String,Object>> |
entrySet(Lang.Function<BeanInfo,Boolean> fieldFilter)
Returns a set of entries stored in the active record.
|
<T> T |
getValue(String key)
Get value from the active record by key specified
|
Map<String,Object> |
internalMap() |
Set<String> |
keySet()
Returns a set of keys that has value stored in the active record
|
T |
mergeValue(String key,
Object val)
Merge a key/val pair in the active record.
|
T |
mergeValues(Map<String,Object> kvMap)
Merge all key/val pairs from specified kv map into this active record
|
T |
putValue(String key,
Object val)
Add or replace a key/val pair into the active record
|
T |
putValues(Map<String,Object> kvMap)
Add all key/val pairs from specified kv map into this active record
|
int |
size()
Get the size of the data stored in the active record
|
Map<String,Object> |
toMap()
Export the key/val pairs from this active record into a map
|
T putValue(String key, Object val)
Add or replace a key/val pair into the active record
key - the keyval - the valueT mergeValue(String key, Object val)
Merge a key/val pair in the active record.
If the key specified does not exists then insert the key/val pair into the record.
If there are existing key/val pair then merge it with the new one:
key - the keyval - the valueT putValues(Map<String,Object> kvMap)
Add all key/val pairs from specified kv map into this active record
kvMap - the key/value pairsT mergeValues(Map<String,Object> kvMap)
Merge all key/val pairs from specified kv map into this active record
kvMap - the key/value pairsmergeValue(String, Object)<T> T getValue(String key)
Get value from the active record by key specified
T - the generic type of the valuekey - the keynull if not foundMap<String,Object> toMap()
Export the key/val pairs from this active record into a map
int size()
Get the size of the data stored in the active record
boolean containsKey(String key)
Check if the active records has a value associated with key specified
key - the keytrue if there is value associated with the key in the record, or false otherwiseSet<String> keySet()
Returns a set of keys that has value stored in the active record
Set<Map.Entry<String,Object>> entrySet()
Returns a set of entries stored in the active record
Set<Map.Entry<String,Object>> entrySet(Lang.Function<BeanInfo,Boolean> fieldFilter)
Returns a set of entries stored in the active record. For field entries, use the field filter specified to check if it needs to be added into the return set
fieldFilter - the function that returns true or false for bean spec of a certain field declared in the classCopyright © 2014–2019 OSGL (Open Source General Library). All rights reserved.