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
BigDecimal 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 LocalDate |
getLocalDate(Cell c)
Get
LocalDate value |
LocalDate |
getLocalDate(int columnIndex)
Get
LocalDate value by column index |
LocalDate |
getLocalDate(String columnName)
Get
LocalDate value by column name |
protected LocalDateTime |
getLocalDateTime(Cell c)
Get
LocalDateTime value |
LocalDateTime |
getLocalDateTime(int columnIndex)
Get
LocalDateTime value by column index |
LocalDateTime |
getLocalDateTime(String columnName)
Get
LocalDateTime value by column name |
protected LocalTime |
getLocalTime(Cell c)
Get
LocalTime value |
LocalTime |
getLocalTime(int columnIndex)
Get
LocalTime value by column index |
LocalTime |
getLocalTime(String columnName)
Get
LocalTime value by column name |
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)
BigDecimal value by column indexcolumnIndex - the cell indexpublic BigDecimal getDecimal(String columnName)
BigDecimal value by column namecolumnName - the cell nameprotected BigDecimal getDecimal(Cell c)
BigDecimal valuec - the Cellpublic Date getDate(int columnIndex)
Date value by column indexcolumnIndex - the cell indexpublic Date getDate(String columnName)
Date value by column namecolumnName - the cell namepublic Timestamp getTimestamp(int columnIndex)
Timestamp value by column indexcolumnIndex - the cell indexpublic Timestamp getTimestamp(String columnName)
Timestamp value by column namecolumnName - the cell nameprotected Timestamp getTimestamp(Cell c)
Timestamp valuec - the Cellpublic Time getTime(int columnIndex)
Time value by column indexcolumnIndex - the cell indexpublic Time getTime(String columnName)
Time value by column namecolumnName - the cell nameprotected Time getTime(Cell c)
Time value by column namec - the Cellpublic LocalDateTime getLocalDateTime(int columnIndex)
LocalDateTime value by column indexcolumnIndex - the cell indexpublic LocalDateTime getLocalDateTime(String columnName)
LocalDateTime value by column namecolumnName - the cell nameprotected LocalDateTime getLocalDateTime(Cell c)
LocalDateTime valuec - the Cellpublic LocalDate getLocalDate(int columnIndex)
LocalDate value by column indexcolumnIndex - the cell indexpublic LocalDate getLocalDate(String columnName)
LocalDate value by column namecolumnName - the cell nameprotected LocalDate getLocalDate(Cell c)
LocalDate valuec - the Cellpublic LocalTime getLocalTime(int columnIndex)
LocalTime value by column indexcolumnIndex - the cell indexpublic LocalTime getLocalTime(String columnName)
LocalTime value by column namecolumnName - the cell nameprotected LocalTime getLocalTime(Cell c)
LocalTime valuec - 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.