You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
2.8 KiB

7 years ago
package com.alibaba.excel.metadata;
import java.util.List;
import java.util.Map;
7 years ago
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.write.handler.WriteHandler;
7 years ago
/**
* table
*
7 years ago
* @author jipengfei
*/
public class Table {
/**
* Starting from 0
7 years ago
*/
private Integer tableNo;
/**
* Writes the head relative to the existing contents of the sheet. Indexes are zero-based.
*/
private Integer writeRelativeHeadRowIndex;
7 years ago
/**
* You can only choose one of the {@link Table#head} and {@link Table#clazz}
7 years ago
*/
private List<List<String>> head;
/**
* You can only choose one of the {@link Table#head} and {@link Table#clazz}
7 years ago
*/
private Class clazz;
/**
* Custom type conversions override the default
*/
private Map<Class, Converter> customConverterMap;
/**
* Need Head
*/
private Boolean needHead;
7 years ago
/**
* Custom type handler override the default
7 years ago
*/
private List<WriteHandler> customWriteHandlerList;
/**
*
* @deprecated please use{@link RowCellStyleStrategy}
*/
@Deprecated
private TableStyle tableStyle;
public Table(Integer tableNo) {
this.tableNo = tableNo;
7 years ago
}
public Integer getTableNo() {
return tableNo;
7 years ago
}
public void setTableNo(Integer tableNo) {
7 years ago
this.tableNo = tableNo;
}
public Integer getWriteRelativeHeadRowIndex() {
return writeRelativeHeadRowIndex;
7 years ago
}
public void setWriteRelativeHeadRowIndex(Integer writeRelativeHeadRowIndex) {
this.writeRelativeHeadRowIndex = writeRelativeHeadRowIndex;
7 years ago
}
public List<List<String>> getHead() {
return head;
}
public void setHead(List<List<String>> head) {
this.head = head;
}
public Class getClazz() {
return clazz;
7 years ago
}
public void setClazz(Class clazz) {
this.clazz = clazz;
}
public Map<Class, Converter> getCustomConverterMap() {
return customConverterMap;
}
public void setCustomConverterMap(Map<Class, Converter> customConverterMap) {
this.customConverterMap = customConverterMap;
}
public Boolean getNeedHead() {
return needHead;
}
public void setNeedHead(Boolean needHead) {
this.needHead = needHead;
}
public List<WriteHandler> getCustomWriteHandlerList() {
return customWriteHandlerList;
}
public void setCustomWriteHandlerList(List<WriteHandler> customWriteHandlerList) {
this.customWriteHandlerList = customWriteHandlerList;
}
public TableStyle getTableStyle() {
return tableStyle;
}
public void setTableStyle(TableStyle tableStyle) {
this.tableStyle = tableStyle;
}
@Override
public String toString() {
return "Table{" + "tableNo=" + tableNo + '}';
7 years ago
}
}