Search in sources :

Example 1 with ArrayConverter

use of com.torodb.backend.converters.array.ArrayConverter in project torodb by torodb.

the class BaseArrayValueToJsonConverter method toValue.

@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public KvArray toValue(JsonArray value) {
    List<KvValue<?>> list = new ArrayList<>(value.size());
    for (JsonValue child : value) {
        ArrayConverter converter = valueToArrayConverterProvider.fromJsonValue(child);
        list.add(converter.fromJsonValue(child));
    }
    return new ListKvArray(list);
}
Also used : ListKvArray(com.torodb.kvdocument.values.heap.ListKvArray) ArrayList(java.util.ArrayList) JsonValue(javax.json.JsonValue) ArrayConverter(com.torodb.backend.converters.array.ArrayConverter) KvValue(com.torodb.kvdocument.values.KvValue)

Aggregations

ArrayConverter (com.torodb.backend.converters.array.ArrayConverter)1 KvValue (com.torodb.kvdocument.values.KvValue)1 ListKvArray (com.torodb.kvdocument.values.heap.ListKvArray)1 ArrayList (java.util.ArrayList)1 JsonValue (javax.json.JsonValue)1