Interface RowGetterIfc

  • All Superinterfaces:
    RowIfc
    All Known Implementing Classes:
    Row

    public interface RowGetterIfc
    extends RowIfc
    An abstraction for getting information and data from a row within a tabular file. The access to the columns is 0-based. Why? Because most if not all of java's data containers (arrays, lists, etc.) are 0-based. The the first column has index 0, 2nd column has index 1, etc.
    • Method Detail

      • getNumeric

        double getNumeric​(int colNum)
        Parameters:
        colNum - the index into the row (0 based)
        Returns:
        the value as a double, will throw an exception if the cell is not NUMERIC
      • getNumeric

        double getNumeric​(java.lang.String columnName)
        Parameters:
        columnName - the name of the column
        Returns:
        the value of the column
      • getNumeric

        double[] getNumeric()
        Returns:
        the numeric columns as an array
      • getText

        java.lang.String getText​(int colNum)
        Parameters:
        colNum - the index into the row (0 based)
        Returns:
        the value as a double, will throw an exception if the cell is not TEXT
      • getText

        java.lang.String[] getText()
        Returns:
        the text columns in order of appearance as an array
      • getText

        java.lang.String getText​(java.lang.String columnName)
        Parameters:
        columnName - the name of the column
        Returns:
        the value of the column
      • getElements

        java.lang.Object[] getElements()
        Returns:
        the elements of the row as Objects
      • getElement

        java.lang.Object getElement​(int colNum)
        Parameters:
        colNum - the column number
        Returns:
        an object representation of the element at the column
      • asStringArray

        java.lang.String[] asStringArray()
        Returns:
        the row as an array of strings
      • toCSV

        java.lang.String toCSV()
        Returns:
        the row as comma separated values. The row does not contain a line separator.