public abstract class Row extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.ttzero.excel.reader.HeaderRow |
hr |
protected org.slf4j.Logger |
LOGGER |
| 构造器和说明 |
|---|
Row() |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
geet()
Returns the binding type if is bound, otherwise returns Row
|
<T> T |
get()
Returns the binding type if is bound, otherwise returns Row
|
protected boolean |
getBoolean(Cell c)
Get boolean value
|
boolean |
getBoolean(int columnIndex)
Get boolean value by column index
|
boolean |
getBoolean(String columnName)
Get boolean value by column name
|
protected byte |
getByte(Cell c)
Get byte value
|
byte |
getByte(int columnIndex)
Get byte value by column index
|
byte |
getByte(String columnName)
Get byte value by column name
|
protected Cell |
getCell(int i)
Returns
Cell |
protected Cell |
getCell(String name)
Search
Cell by column name |
protected CellType |
getCellType(Cell c)
Returns the type of cell
|
CellType |
getCellType(int columnIndex)
Returns the type of cell
|
CellType |
getCellType(String columnName)
Returns the type of cell
|
protected char |
getChar(Cell c)
Get char value
|
char |
getChar(int columnIndex)
Get char value by column index
|
char |
getChar(String columnName)
Get char value by column name
|
protected Date |
getDate(Cell c)
Get date value
|
Date |
getDate(int columnIndex)
Get date value by column index
|
Date |
getDate(String columnName)
Get date value by column name
|
protected BigDecimal |
getDecimal(Cell c)
Get BigDecimal value
|
BigDecimal |
getDecimal(int columnIndex)
Get decimal value by column index
|
BigDecimal |
getDecimal(String columnName)
Get BigDecimal value by column name
|
protected double |
getDouble(Cell c)
Get double value
|
double |
getDouble(int columnIndex)
Get double value by column index
|
double |
getDouble(String columnName)
Get double value by column name
|
int |
getFirstColumnIndex()
Returns the index of the first column (zero base)
|
float |
getFloat(int columnIndex)
Get float value by column index
|
float |
getFloat(String columnName)
Get float value by column index
|
String |
getFormula(int columnIndex)
Returns formula if exists
|
String |
getFormula(String columnName)
Returns formula if exists
|
protected int |
getInt(Cell c)
Get int value
|
int |
getInt(int columnIndex)
Get int value by column index
|
int |
getInt(String columnName)
Get int value by column name
|
int |
getLastColumnIndex()
Returns the index of the last column (zero base).
|
protected long |
getLong(Cell c)
Get long value
|
long |
getLong(int columnIndex)
Get long value by column index
|
long |
getLong(String columnName)
Get long value by column name
|
int |
getRowNumber()
The number of row.
|
protected short |
getShort(Cell c)
Get short value
|
short |
getShort(int columnIndex)
Get short value by column index
|
short |
getShort(String columnName)
Get short value by column name
|
protected String |
getString(Cell c)
Get string value
|
String |
getString(int columnIndex)
Get string value by column index
|
String |
getString(String columnName)
Get string value by column name
|
protected Time |
getTime(Cell c)
Get time value by column name
|
Time |
getTime(int columnIndex)
Get time value by column index
|
Time |
getTime(String columnName)
Get time value by column name
|
protected Timestamp |
getTimestamp(Cell c)
Get timestamp value
|
Timestamp |
getTimestamp(int columnIndex)
Get timestamp value by column index
|
Timestamp |
getTimestamp(String columnName)
Get timestamp value by column name
|
boolean |
hasFormula(int columnIndex)
Check cell has formula
|
boolean |
hasFormula(String columnName)
Check cell has formula
|
boolean |
isEmpty()
Test unused row (not contains any filled or formatted or value)
|
protected void |
rangeCheck(int index) |
<T> T |
to(Class<T> clazz)
Convert to object, support annotation
|
static int |
toCellIndex(char[] cb,
int a,
int b)
Convert to column index
|
<T> T |
too(Class<T> clazz)
Convert to T object, support annotation
the is a memory shared object
|
String |
toString() |
protected final org.slf4j.Logger LOGGER
protected org.ttzero.excel.reader.HeaderRow hr
public int getRowNumber()
public int getFirstColumnIndex()
public int getLastColumnIndex()
public boolean isEmpty()
protected void rangeCheck(int index)
protected Cell getCell(String name)
Cell by column namename - the column nameCellpublic boolean getBoolean(int columnIndex)
columnIndex - the cell indexpublic boolean getBoolean(String columnName)
columnName - the cell namepublic byte getByte(int columnIndex)
columnIndex - the cell indexpublic byte getByte(String columnName)
columnName - the cell namepublic char getChar(int columnIndex)
columnIndex - the cell indexpublic char getChar(String columnName)
columnName - the cell namepublic short getShort(int columnIndex)
columnIndex - the cell indexpublic short getShort(String columnName)
columnName - the cell namepublic int getInt(int columnIndex)
columnIndex - the cell indexpublic int getInt(String columnName)
columnName - the cell namepublic long getLong(int columnIndex)
columnIndex - the cell indexpublic long getLong(String columnName)
columnName - the cell namepublic String getString(int columnIndex)
columnIndex - the cell indexpublic String getString(String columnName)
columnName - the cell namepublic float getFloat(int columnIndex)
columnIndex - the cell indexpublic float getFloat(String columnName)
columnName - the cell indexpublic double getDouble(int columnIndex)
columnIndex - the cell indexpublic double getDouble(String columnName)
columnName - the cell namepublic BigDecimal getDecimal(int columnIndex)
columnIndex - the cell indexpublic BigDecimal getDecimal(String columnName)
columnName - the cell nameprotected BigDecimal getDecimal(Cell c)
c - the Cellpublic Date getDate(int columnIndex)
columnIndex - the cell indexpublic Date getDate(String columnName)
columnName - the cell namepublic Timestamp getTimestamp(int columnIndex)
columnIndex - the cell indexpublic Timestamp getTimestamp(String columnName)
columnName - the cell nameprotected Timestamp getTimestamp(Cell c)
c - the Cellpublic Time getTime(int columnIndex)
columnIndex - the cell indexpublic Time getTime(String columnName)
columnName - the cell nameprotected Time getTime(Cell c)
c - the Cellpublic String getFormula(int columnIndex)
columnIndex - the cell indexpublic String getFormula(String columnName)
columnName - the cell namepublic boolean hasFormula(int columnIndex)
columnIndex - the cell indexpublic boolean hasFormula(String columnName)
columnName - the cell namepublic CellType getCellType(int columnIndex)
columnIndex - the cell index from zeroCellTypepublic CellType getCellType(String columnName)
columnName - the cell nameCellTypepublic <T> T get()
T - the type of bindingpublic <T> T geet()
T - the type of bindingpublic <T> T to(Class<T> clazz)
T - the type of return objectclazz - the type of bindingpublic <T> T too(Class<T> clazz)
T - the type of return objectclazz - the type of bindingpublic static int toCellIndex(char[] cb,
int a,
int b)
cb - character buffera - the start indexb - the end indexCopyright © 2020. All rights reserved.