default <K, V> Map<K, V> asMap(Class<K> keyClass, Class<V> valueClass) {
        if (isNullOrEmpty()) {
            return Collections.emptyMap();
        }

        ClickHouseChecker.nonNull(keyClass, "keyClass");
        Map<K, V> map = new LinkedHashMap<>();
        int index = 1;
        for (V v : asArray(valueClass)) {
            map.put(keyClass.cast(index++), v);
        }
        // why not use Collections.unmodifiableMap(map) here?
        return map;
    }
Gets value as a map.

@param <K>        type of key
@param <V>        type of value
@param keyClass   non-null class of key
@param valueClass non-null class of value
@return non-null map value
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseValue.java