All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.simpleflatmapper.jdbc.named.TupleBuilder Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 9.0.2
Show newest version
package org.simpleflatmapper.jdbc.named;

import java.util.ArrayList;
import java.util.List;

public class TupleBuilder {

    private final Symbol word;
    private List arguments = new ArrayList(10);
    private final int start;

    public TupleBuilder(Symbol word, int start) {
        this.word = word;
        this.start = start;
    }

    public void add(Symbol argument) {
        arguments.add(argument);
    }

    public Tuple toTuple(int end) {
        return new Tuple(word, arguments.toArray(new Symbol[0]), new Position(start, end));
    }

    public int size() {
        return arguments.size();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy