Package oms3.io
Class MemoryTable
- java.lang.Object
-
- oms3.io.MemoryTable
-
- All Implemented Interfaces:
TableModel,CSTable
public class MemoryTable extends Object implements CSTable, TableModel
Table, that can be *fully* managed in Memory.- Author:
- Olaf David
-
-
Constructor Summary
Constructors Constructor Description MemoryTable()MemoryTable(CSTable src)MemoryTable(CSTable src, boolean skipContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRow(Object... row)voidaddRows(List<String[]> r)voidaddTableModelListener(TableModelListener l)voidclearRows()Class<?>getColumnClass(int columnIndex)intgetColumnCount()get the number of columns in the tableMap<String,String>getColumnInfo(int column)Get the info for a column.StringgetColumnName(int column)Get the column name.Map<String,String>getInfo()Get the annotations for the tableStringgetName()Get the name of the tableintgetRowCount()List<String[]>getRows()List<String[]>getRows(int from, int to)ObjectgetValueAt(int rowIndex, int columnIndex)booleanisCellEditable(int rowIndex, int columnIndex)Iterator<String[]>iterator()voidremoveTableModelListener(TableModelListener l)Iterable<String[]>rows()get the row iterator.Iterable<String[]>rows(int skipRow)get the row iterator and skip the first rows.voidsetColumns(String... columns)voidsetName(String name)voidsetValueAt(Object aValue, int rowIndex, int columnIndex)
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:CSTableGet the name of the table
-
getInfo
public Map<String,String> getInfo()
Description copied from interface:CSTableGet the annotations for the table
-
getColumnCount
public int getColumnCount()
Description copied from interface:CSTableget the number of columns in the table- Specified by:
getColumnCountin interfaceCSTable- Specified by:
getColumnCountin interfaceTableModel- Returns:
- the number of columns.
-
getColumnName
public String getColumnName(int column)
Description copied from interface:CSTableGet the column name.- Specified by:
getColumnNamein interfaceCSTable- Specified by:
getColumnNamein interfaceTableModel- Returns:
- the column name.
-
setColumns
public void setColumns(String... columns)
-
getRowCount
public int getRowCount()
- Specified by:
getRowCountin interfaceTableModel
-
getColumnClass
public Class<?> getColumnClass(int columnIndex)
- Specified by:
getColumnClassin interfaceTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)- Specified by:
isCellEditablein interfaceTableModel
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAtin interfaceTableModel
-
setValueAt
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
- Specified by:
setValueAtin interfaceTableModel
-
addTableModelListener
public void addTableModelListener(TableModelListener l)
- Specified by:
addTableModelListenerin interfaceTableModel
-
removeTableModelListener
public void removeTableModelListener(TableModelListener l)
- Specified by:
removeTableModelListenerin interfaceTableModel
-
setName
public void setName(String name)
-
addRow
public void addRow(Object... row)
-
clearRows
public void clearRows()
-
getColumnInfo
public Map<String,String> getColumnInfo(int column)
Description copied from interface:CSTableGet the info for a column.- Specified by:
getColumnInfoin interfaceCSTable- Returns:
- a map with KVP for column meta data.
-
rows
public Iterable<String[]> rows()
Description copied from interface:CSTableget the row iterator.
-
-