class ValueAndInputRow<TValue> extends InputRow implements Function<TValue, Row>, Supplier<TValue> {

    private final Iterable<? extends CollectExpression<TValue, ?>> expressions;
    private TValue value;

    public ValueAndInputRow(List<? extends Input<?>> inputs, Iterable<? extends CollectExpression<TValue, ?>> expressions) {
        super(inputs);
        this.expressions = expressions;
    }

    @Override
    public TValue get() {
        return value;
    }

    @Nullable
    @Override
    public Row apply(@Nullable TValue input) {<FILL_FUNCTION_BODY>}
}

        value = input;
        for (CollectExpression<TValue, ?> expression : expressions) {
            expression.setNextRow(input);
        }
        return this;
    
<methods>public void <init>(List<? extends Input<?>>) ,public java.lang.Object get(int) ,public int numColumns() ,public java.lang.String toString() <variables>private final non-sealed List<? extends Input<?>> inputs