class ScoredValueScanOutput<K, V> extends ScanOutput<K, V, ScoredValueScanCursor<V>> {

    private V value;

    private boolean hasValue;

    public ScoredValueScanOutput(RedisCodec<K, V> codec) {
        super(codec, new ScoredValueScanCursor<V>());
    }

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

    @Override
    public void set(double number) {
        if (hasValue) {
            output.getValues().add(ScoredValue.just(number, value));
        }
        value = null;
        hasValue = false;
    }

}


        if (!hasValue) {
            value = codec.decodeValue(bytes);
            hasValue = true;
            return;
        }

        double score = LettuceStrings.toDouble(decodeAscii(bytes));
        set(score);
    
<methods>public void <init>(RedisCodec<K,V>, ScoredValueScanCursor<V>) ,public void set(java.nio.ByteBuffer) <variables>