class GenericMapOutput<K, V> extends CommandOutput<K, V, Map<K, Object>> {

    boolean hasKey;
    private K key;

    public GenericMapOutput(RedisCodec<K, V> codec) {
        super(codec, null);
    }

    @Override
    public void set(ByteBuffer bytes) {

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

        Object value = (bytes == null) ? null : codec.decodeValue(bytes);
        output.put(key, value);
        key = null;
        hasKey = false;
    }

    @Override
    public void setBigNumber(ByteBuffer bytes) {
        set(bytes);
    }

    @Override
    @SuppressWarnings("unchecked")
    public void set(long integer) {<FILL_FUNCTION_BODY>}

    @Override
    public void set(double number) {

        if (!hasKey) {
            key = (K) Double.valueOf(number);
            hasKey = true;
            return;
        }

        Object value = Double.valueOf(number);
        output.put(key, value);
        key = null;
        hasKey = false;
    }

    @Override
    public void multi(int count) {

        if (output == null) {
            output = new LinkedHashMap<>(count / 2, 1);
        }
    }

}


        if (!hasKey) {
            key = (K) Long.valueOf(integer);
            hasKey = true;
            return;
        }

        V value = (V) Long.valueOf(integer);
        output.put(key, value);
        key = null;
        hasKey = false;
    
<methods>public void <init>(RedisCodec<K,V>, Map<K,java.lang.Object>) ,public void complete(int) ,public Map<K,java.lang.Object> get() ,public java.lang.String getError() ,public boolean hasError() ,public void multi(int) ,public void multiArray(int) ,public void multiMap(int) ,public void multiPush(int) ,public void multiSet(int) ,public void set(java.nio.ByteBuffer) ,public void set(long) ,public void set(double) ,public void set(boolean) ,public void setBigNumber(java.nio.ByteBuffer) ,public void setError(java.nio.ByteBuffer) ,public void setError(java.lang.String) ,public void setSingle(java.nio.ByteBuffer) ,public java.lang.String toString() <variables>protected final non-sealed RedisCodec<K,V> codec,protected java.lang.String error,protected Map<K,java.lang.Object> output