class MapScanOutput<K, V> extends ScanOutput<K, V, MapScanCursor<K, V>> {

    private K key;

    private boolean hasKey;

    public MapScanOutput(RedisCodec<K, V> codec) {
        super(codec, new MapScanCursor<K, V>());
    }

    @Override
    protected void setOutput(ByteBuffer bytes) {<FILL_FUNCTION_BODY>}

}


        if (!hasKey) {
            key = codec.decodeKey(bytes);
            hasKey = true;
            return;
        }

        V value = (bytes == null) ? null : codec.decodeValue(bytes);
        output.getMap().put(key, value);
        key = null;
        hasKey = false;
    
<methods>public void <init>(RedisCodec<K,V>, MapScanCursor<K,V>) ,public void set(java.nio.ByteBuffer) <variables>