# Class MapGroupTableModel<K,V>

java.lang.Object
javax.swing.table.AbstractTableModel
uk.ac.starlink.table.gui.MapGroupTableModel<K,V>

All Implemented Interfaces:
  `Serializable, TableModel`

public class MapGroupTableModel<K,V> extends AbstractTableModel
Provides a `TableModel` view of a `MapGroup` object. For performance reasons this implementation takes a snapshot of the MapGroup at construction time rather than treating it as a live object.

Author:
  Mark Taylor (Starlink)
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class AbstractTableModel

`listenerList`

## Constructor Summary

Constructors
Constructor
Description
`MapGroupTableModel(uk.ac.starlink.util.MapGroup<K,V> mapgroup)`
Constructs a TableModel from a given MapGroup.

## Method Summary

Modifier and Type
Method
Description
`int`
`getColumnCount()`
`String`
`getColumnName(int icol)`
`int`
`getRowCount()`
`V`
`getValueAt(int irow, int icol)`

### Methods inherited from class AbstractTableModel

`addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MapGroupTableModel

public MapGroupTableModel(uk.ac.starlink.util.MapGroup<K,V> mapgroup)
Constructs a TableModel from a given MapGroup.

Parameters:
  `mapgroup` - group to snapshot

## Method Details

### getRowCount

public int getRowCount()

### getColumnCount

public int getColumnCount()

### getValueAt

public V getValueAt(int irow, int icol)

### getColumnName

public String getColumnName(int icol)

Specified by:
  `getColumnName` in interface `TableModel`
Overrides:
  `getColumnName` in class `AbstractTableModel`