class ListBasedMapCodec implements Codec<Map<K,V>> {

    public Map<K,V> decode(BitBuffer buffer, Resolver resolver, Builder builder) throws DecodingException {
        List<? extends Map.Entry<K, V>> entries = listCodec.decode(buffer, resolver, builder);
        Map<K,V> result = new HashMap(entries.size());
        for (Map.Entry<K, V> entry : entries) {
            result.put(entry.getKey(), entry.getValue());
        }
        return result;
    }

    public  ListBasedMapCodec(Codec<List<Map.Entry<K,V>>> listCodec);

}