package org.mybatis.qbe.sql.insert;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Stream;

import org.mybatis.qbe.sql.FieldValuePair;

public class InsertValues {
    private List<FieldValuePair<?>> fieldValuePairs = new ArrayList<>();

    private InsertValues(Stream<FieldValuePair<?>> fieldValuePairs) {
        fieldValuePairs.forEach(this.fieldValuePairs::add);
    }

    public void visitFieldValuePairs(Consumer<FieldValuePair<?>> consumer) {
        fieldValuePairs.stream().forEach(consumer);
    }

    public static class Builder {
        private List<FieldValuePair<?>> fieldValuePairs = new ArrayList<>();
        
        public Builder() {
            super();
        }
        
        public Builder withFieldValuePair(FieldValuePair<?> fieldValuePair) {
            fieldValuePairs.add(fieldValuePair);
            return this;
        }

        public Builder withFieldValuePairs(Stream<FieldValuePair<?>> fieldValuePairs) {
            fieldValuePairs.forEach(this.fieldValuePairs::add);
            return this;
        }
        
        public InsertValues build() {
            return new InsertValues(fieldValuePairs.stream());
        }
        
        public InsertValues buildIgnoringAlias() {
            return new InsertValues(fieldValuePairs.stream().map(FieldValuePair::ignoringAlias));
        }
    }
}

@@ -760,171 +760,8 @@
    %0A
-        public Builder withFieldValuePair(FieldValuePair%3C?%3E fieldValuePair) %7B%0A            fieldValuePairs.add(fieldValuePair);%0A            return this;%0A        %7D%0A%0A
     

Remove unnecessary method