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

org.sfm.csv.ParsingContextFactoryBuilder 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: 1.10.3
Show newest version
package org.sfm.csv;


import org.sfm.csv.impl.ParsingContextFactory;
import org.sfm.map.ParsingContextProvider;

public class ParsingContextFactoryBuilder {

    private final ParsingContextProvider[] providers;
    private boolean hasProviders = false;

    public ParsingContextFactoryBuilder(int size) {
        this.providers = new ParsingContextProvider[size];
    }
    public void addParsingContextProvider(int index, ParsingContextProvider provider) {
        providers[index] = provider; hasProviders = true;
    }

    public ParsingContextFactory newFactory() {
        return new ParsingContextFactory(hasProviders ? providers : null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy