class NestedMultiOutput<K, V> extends CommandOutput<K, V, List<Object>> {

    private final Deque<List<Object>> stack;

    private int depth;

    private boolean initialized;

    public NestedMultiOutput(RedisCodec<K, V> codec) {
        super(codec, Collections.emptyList());
        stack = LettuceFactories.newSpScQueue();
        depth = 0;
    }

    @Override
    public void set(long integer) {

        if (!initialized) {
            output = new ArrayList<>();
        }

        output.add(integer);
    }

    @Override
    public void set(double number) {

        if (!initialized) {
            output = new ArrayList<>();
        }

        output.add(number);
    }

    @Override
    public void set(ByteBuffer bytes) {<FILL_FUNCTION_BODY>}

    @Override
    public void setSingle(ByteBuffer bytes) {

        if (!initialized) {
            output = new ArrayList<>();
        }

        output.add(bytes == null ? null : StringCodec.UTF8.decodeValue(bytes));
    }

    @Override
    public void complete(int depth) {
        if (depth > 0 && depth < this.depth) {
            output = stack.pop();
            this.depth--;
        }
    }

    @Override
    public void multi(int count) {

        if (!initialized) {
            output = OutputFactory.newList(Math.max(1, count));
            initialized = true;
        }

        List<Object> a = OutputFactory.newList(count);
        output.add(a);
        stack.push(output);
        output = a;
        this.depth++;
    }

}


        if (!initialized) {
            output = new ArrayList<>();
        }

        output.add(bytes == null ? null : codec.decodeValue(bytes));
    
<methods>public void <init>(RedisCodec<K,V>, List<java.lang.Object>) ,public void complete(int) ,public List<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 List<java.lang.Object> output