Package com.inet.excel.parser
Class RowSpanData
java.lang.Object
com.inet.excel.parser.RowSpanData
Mutable container for information about row span in single sheet from Excel workbook.
It is intended to be used, while parsing sheet data, in order to determine dimension of Excel sheet.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCellRef(String ref) Updates indexes of columns, which constitute row span, based on provided cell reference.voidaddSpanRange(String spans) Updates indexes of columns, which constitute row span, based on provided span information.intReturns index of first column included in row span (minimum value is 1).intReturns index of last column included in row span (minimum value is 1).booleanisEmpty()Returns true, if container has not been initialized with valid data yet.
-
Constructor Details
-
RowSpanData
public RowSpanData()
-
-
Method Details
-
addSpanRange
Updates indexes of columns, which constitute row span, based on provided span information. It ignores provided information if it is invalid. Examples of valid span information: "2:2", "4:7", "23:45". Examples of invalid span information: null, "", " ", "5", ":6", "6:", "A:4", "4:Z", "5:4".- Parameters:
spans- span information to retrieve indexes of columns from.
-
addCellRef
Updates indexes of columns, which constitute row span, based on provided cell reference. It ignores provided reference if it is invalid. Examples of valid cell references: "A1", "A7", "G14", "BB44", "ASD1". Examples of invalid cell references: null, "", " ", "5", "$".- Parameters:
ref- cell reference to retrieve index of column from.
-
isEmpty
public boolean isEmpty()Returns true, if container has not been initialized with valid data yet. Otherwise, returns false.- Returns:
- true, if container has not been initialized with valid data yet. Otherwise, returns false.
-
getFirstColumnIndex
public int getFirstColumnIndex()Returns index of first column included in row span (minimum value is 1). If this method returns 0, it means that container has not been initialized yet and represents no row span.- Returns:
- index of first column included in row span (minimum value is 1) or 0, if container has not been initialized yet and represents no row span.
-
getLastColumnIndex
public int getLastColumnIndex()Returns index of last column included in row span (minimum value is 1). If this method returns 0, it means that container has not been initialized yet and represents no row span.- Returns:
- index of last column included in row span (minimum value is 1) or 0, if container has not been initialized yet and represents no row span.
-