Search in sources :

Example 1 with MapKvDocument

use of com.torodb.kvdocument.values.heap.MapKvDocument in project torodb by torodb.

the class MapToKvValueConverter method convertMap.

private KvValue<?> convertMap(Map<String, Object> source) {
    if (isSpecialObject(source)) {
        return buildSpecialObject(source);
    }
    LinkedHashMap<String, KvValue<?>> docMap = new LinkedHashMap<>();
    source.forEach((key, value) -> {
        String interned = key.intern();
        docMap.put(interned, convertValue(value));
    });
    return new MapKvDocument(docMap);
}
Also used : StringKvString(com.torodb.kvdocument.values.heap.StringKvString) KvValue(com.torodb.kvdocument.values.KvValue) LinkedHashMap(java.util.LinkedHashMap) MapKvDocument(com.torodb.kvdocument.values.heap.MapKvDocument)

Aggregations

KvValue (com.torodb.kvdocument.values.KvValue)1 MapKvDocument (com.torodb.kvdocument.values.heap.MapKvDocument)1 StringKvString (com.torodb.kvdocument.values.heap.StringKvString)1 LinkedHashMap (java.util.LinkedHashMap)1