seven.wapperInt.wapperRef.WrapperObj Maven / Gradle / Ivy
Show all versions of ExcelReads Show documentation
package seven.wapperInt.wapperRef;
//=======================================================
// .----.
// _.'__ `.
// .--(^)(^^)---/#\
// .' @ /###\
// : , #####
// `-..__.-' _.-\###/
// `;_: `"'
// .'"""""`.
// /, ya ,\\
// //狗神保佑 \\
// `-._______.-'
// ___`. | .'___
// (______|______)
//=======================================================
import seven.callBack.DataFilterInterface;
import seven.callBack.DataFilterProcessInterface;
import seven.callBack.imp.DefaultDataFilter;
import seven.callBack.imp.DefaultDataProFilter;
import seven.config.Config;
import seven.wapperInt.Wrapper;
import java.util.*;
import java.util.function.Consumer;
/**
* @author Seven
* date 2016年4月12日-下午4:07:57
*/
@SuppressWarnings("all")
public abstract class WrapperObj extends Wrapper {
protected DataFilterInterface filter=new DefaultDataFilter();
protected DataFilterProcessInterface process=new DefaultDataProFilter();
protected List filterColByKey =new ArrayList<>();
protected List filterColByValue =new ArrayList<>();
protected Comparator c=null;
protected String fs;
protected static final boolean isMap=false;
protected abstract T RefResWrapper(String fs, boolean isMap, String key) throws Exception;
public WrapperObj(Consumer consumer) {
super(consumer);
}
protected boolean isNull(Map map) {
boolean isN = true;
for (Map.Entry s : map.entrySet()) {
isN = isN && s.getValue().trim().equals("");
}
return isN;
}
@Override
public Wrapper FilterCol(Consumer> consumer) {
consumer.accept(filterColByKey);
return this;
}
public Wrapper init(String filePath){
this.fs=filePath;
return this;
}
public Wrapper Sort(Comparator c) {
this.c = c;return this;
}
public List Create() throws Exception{
return RefResWrapper(fs,isMap,null);
}
@Override
public List