Class TableModel.Cell<C>

  • Type Parameters:
    C - The type of value contained in the cell.
    Enclosing interface:
    TableModel

    public static class TableModel.Cell<C>
    extends java.lang.Object
    A lightweight class representing a row and column in a table. This class is useful as a map key, for instance.
    Author:
    Garret Wilson
    • Constructor Summary

      Constructors 
      Constructor Description
      Cell​(int rowIndex, TableColumnModel<C> column)
      Row and column constructor
    • Constructor Detail

      • Cell

        public Cell​(int rowIndex,
                    TableColumnModel<C> column)
        Row and column constructor
        Parameters:
        rowIndex - The zero-based cell row index.
        column - The cell column.
        Throws:
        java.lang.NullPointerException - if the given column is null.
    • Method Detail

      • getRowIndex

        public int getRowIndex()
        Returns:
        The zero-based row index.
      • equals

        public boolean equals​(java.lang.Object object)
        Determines whether the given object is equal to this object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object - The object to compare to this object.
        Returns:
        true if the given object is another cell with the same row index and column.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code for the cell.