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

com.github.rrsunhome.excelsql.config.CellMapping Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
package com.github.rrsunhome.excelsql.config;

import com.github.rrsunhome.excelsql.config.converter.CellConverter;
import com.github.rrsunhome.excelsql.config.converter.ObjectToStringCellConverter;
import com.github.rrsunhome.excelsql.config.filter.CellFilter;
import com.github.rrsunhome.excelsql.config.filter.TrueCellFilter;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

/**
 * @author : wangqijia
 * create at:  2021/10/26  上午10:25
 */
@Builder
@Getter
@Setter
public class CellMapping {

    private String cellName;

    private int cellNum;

    @Builder.Default
    private CellFilter cellFilter = TrueCellFilter.INSTANCE;

    @Builder.Default
    private CellConverter cellConverter = ObjectToStringCellConverter.INSTANCE;

    public boolean filter(String cellValue) {
        return cellFilter.filter(cellValue);
    }

    public String convert(String cellValue) {
        return cellConverter.convert(cellValue);
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy