Class AbstractHeaderTable<T>

    • Constructor Detail

      • AbstractHeaderTable

        public AbstractHeaderTable()
    • Method Detail

      • cell

        public final T cell​(int row,
                            String column)
        Description copied from interface: IHeaderTable
        Gets the value at the given row and column.
        Specified by:
        cell in interface IHeaderTable<T>
        Parameters:
        row - The row index.
        column - The column name.
        Returns:
        The value at the given row and column.
      • cell

        public final T cell​(int row,
                            int column)
        Description copied from interface: IHeaderTable
        Gets the value at the given row and column.
        Specified by:
        cell in interface IHeaderTable<T>
        Parameters:
        row - The row index.
        column - The column index.
        Returns:
        The value at the given row and column.
      • columnCount

        public final int columnCount()
        Description copied from interface: IHeaderTable
        Returns the number of columns in the table.
        Specified by:
        columnCount in interface IHeaderTable<T>
        Returns:
        The number of columns.
      • columnToIndex

        public int columnToIndex​(String column)
        Description copied from interface: IHeaderTable
        Converts a column name to an index.
        Specified by:
        columnToIndex in interface IHeaderTable<T>
        Parameters:
        column - The column name.
        Returns:
        The index of the column.
      • columnsByIndex

        public final Map<Integer,​T> columnsByIndex​(int row)
        Description copied from interface: IHeaderTable
        Gets a view of the given row as a map. The keys are the column indices.
        Specified by:
        columnsByIndex in interface IHeaderTable<T>
        Parameters:
        row - Index of a row.
        Returns:
        A view of the given row as a map.
      • columnsByName

        public final Map<String,​T> columnsByName​(int row)
        Description copied from interface: IHeaderTable
        Gets a view of the given row as a map. The keys are the column names.
        Specified by:
        columnsByName in interface IHeaderTable<T>
        Parameters:
        row - Index of a row.
        Returns:
        A view of the given row as a map.
      • hasColumn

        public final boolean hasColumn​(int column)
        Description copied from interface: IHeaderTable
        Checks if the table has a column at the given index.
        Specified by:
        hasColumn in interface IHeaderTable<T>
        Parameters:
        column - The name of the column.
        Returns:
        true if the table has a column at the given index, false otherwise.
      • hasColumn

        public boolean hasColumn​(String column)
        Description copied from interface: IHeaderTable
        Checks if the table has a column with the given name.
        Specified by:
        hasColumn in interface IHeaderTable<T>
        Parameters:
        column - The name of the column.
        Returns:
        true if the table has a column with the given name, false otherwise.
      • hasRow

        public final boolean hasRow​(int row)
        Description copied from interface: IHeaderTable
        Checks if the table has a row at the given index.
        Specified by:
        hasRow in interface IHeaderTable<T>
        Parameters:
        row - The index of the row.
        Returns:
        true if the table has a row at the given index, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • indexToColumn

        public final String indexToColumn​(int index)
        Description copied from interface: IHeaderTable
        Converts an index to a column name.
        Specified by:
        indexToColumn in interface IHeaderTable<T>
        Parameters:
        index - The index of the column.
        Returns:
        The column name.
      • row

        public final List<T> row​(int index)
        Description copied from interface: IHeaderTable
        Returns a view of the given row. The list will have the same number of elements as there are columns in the table.
        Specified by:
        row in interface IHeaderTable<T>
        Parameters:
        index - The index of the row.
        Returns:
        A view of the given row.
      • rowCount

        public final int rowCount()
        Description copied from interface: IHeaderTable
        Returns the number of rows in the table.
        Specified by:
        rowCount in interface IHeaderTable<T>
        Returns:
        The number of rows.
      • rows

        public final List<T> rows​(String column)
        Description copied from interface: IHeaderTable
        Returns a view of all rows at the given column. The list will have the same number of elements as there are rows.
        Specified by:
        rows in interface IHeaderTable<T>
        Parameters:
        column - The name of the column.
        Returns:
        A view of all rows at the given column.
      • rows

        public final List<T> rows​(int column)
        Description copied from interface: IHeaderTable
        Returns a view of all rows at the given column. The list will have the same number of elements as there are rows.
        Specified by:
        rows in interface IHeaderTable<T>
        Parameters:
        column - The index of the column.
        Returns:
        A view of all rows at the given column.