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

com.github.houbb.csv.support.context.DefaultReadContext Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
package com.github.houbb.csv.support.context;

import com.github.houbb.csv.api.IReadContext;
import com.github.houbb.heaven.support.sort.ISort;

/**
 * 默认读取上下文
 * @author binbin.hou
 * @since 0.0.1
 * @param  泛型
 */
public class DefaultReadContext implements IReadContext {

    private String charset;

    private ISort sort;

    private String path;

    private Class readClass;

    private int startIndex;

    private int endIndex;

    public DefaultReadContext newInstance() {
        return new DefaultReadContext();
    }

    @Override
    public String charset() {
        return charset;
    }

    public DefaultReadContext charset(String charset) {
        this.charset = charset;
        return this;
    }

    @Override
    public ISort sort() {
        return sort;
    }

    public DefaultReadContext sort(ISort sort) {
        this.sort = sort;
        return this;
    }

    @Override
    public String path() {
        return path;
    }

    public DefaultReadContext path(String path) {
        this.path = path;
        return this;
    }

    @Override
    public Class readClass() {
        return readClass;
    }

    public DefaultReadContext readClass(Class readClass) {
        this.readClass = readClass;
        return this;
    }

    @Override
    public int startIndex() {
        return startIndex;
    }

    public DefaultReadContext startIndex(int startIndex) {
        this.startIndex = startIndex;
        return this;
    }

    @Override
    public int endIndex() {
        return endIndex;
    }

    public DefaultReadContext endIndex(int endIndex) {
        this.endIndex = endIndex;
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy