Class RowSpanData

java.lang.Object
com.inet.excel.parser.RowSpanData

public class RowSpanData extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Updates indexes of columns, which constitute row span, based on provided cell reference.
    void
    Updates indexes of columns, which constitute row span, based on provided span information.
    int
    Returns index of first column included in row span (minimum value is 1).
    int
    Returns index of last column included in row span (minimum value is 1).
    boolean
    Returns true, if container has not been initialized with valid data yet.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RowSpanData

      public RowSpanData()
  • Method Details

    • addSpanRange

      public void addSpanRange(String spans)
      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

      public void addCellRef(String ref)
      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.