T
- The type of data stored in the table.public abstract class AbstractTable<C extends Column<? extends T>,T> extends SizableArrayList<C> implements Table<C,T>
Table
implementations.modCount
Constructor and Description |
---|
AbstractTable()
Creates an empty table.
|
AbstractTable(int colCount,
int rowCount)
Creates a table with the given column and row dimensions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(C column)
Appends the specified column to the end of the table.
|
void |
add(int col,
C column)
Inserts the specified column at the specified position in the table.
|
boolean |
addAll(Collection<? extends C> c)
Appends all of the columns in the specified collection to the end of the
table, in the order that they are returned by the specified collection's
iterator.
|
boolean |
addAll(int col,
Collection<? extends C> c)
Inserts all of the columns in the specified collection into this list at
the specified position.
|
protected abstract C |
createColumn(String colHeader) |
int |
getRowCount()
Gets the number of rows in the table.
|
String |
getRowHeader(int row)
Gets the row header at the given row.
|
ArrayList<C> |
insertColumns(int col,
int count)
Inserts a block of columns (with no headers) at the given position in the
table.
|
void |
removeRows(int row,
int count)
Removes a block of rows starting at the given position from the table.
|
void |
set(String colHeader,
int row,
T value)
Sets the table value at the given column and row.
|
void |
setColumnCount(int colCount)
Sets the number of columns in the table.
|
void |
setRowCount(int rowCount)
Sets the number of rows in the table.
|
void |
setRowHeader(int row,
String header)
Sets the row header at the given row.
|
ensureCapacity, setSize
clear, clone, contains, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
appendColumn, appendColumn, appendColumns, appendColumns, appendRow, appendRow, appendRows, appendRows, clear, contains, containsAll, get, get, get, get, getColumnCount, getColumnHeader, getColumnIndex, getRowIndex, indexOf, insertColumn, insertColumn, insertColumns, insertRow, insertRow, insertRows, insertRows, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeColumn, removeColumn, removeColumns, removeColumns, removeRow, removeRow, removeRows, retainAll, set, set, setColumnHeader, setDimensions, size, subList, toArray, toArray
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public AbstractTable()
public AbstractTable(int colCount, int rowCount)
public void setColumnCount(int colCount)
Table
public ArrayList<C> insertColumns(int col, int count)
Table
public int getRowCount()
Table
public void setRowCount(int rowCount)
Table
public void removeRows(int row, int count)
Table
public String getRowHeader(int row)
Table
public void setRowHeader(int row, String header)
Table
public void set(String colHeader, int row, T value)
Table
public boolean add(C column)
Table
Updates the row count if this column has more rows than current table and scales the existing columns to have the same number of rows.
public void add(int col, C column)
Table
Updates the row count if this column has more rows than current table and scales the existing columns to have the same number of rows.
public boolean addAll(Collection<? extends C> c)
Table
Updates the row count if necessary, and scales the columns to match the row count if necessary.
addAll
in interface Collection<C extends Column<? extends T>>
addAll
in interface List<C extends Column<? extends T>>
addAll
in interface Table<C extends Column<? extends T>,T>
addAll
in class ArrayList<C extends Column<? extends T>>
public boolean addAll(int col, Collection<? extends C> c)
Table
Updates the row count if necessary, and scales the columns to match the row count if necessary.
Copyright © 2015–2022 SciJava. All rights reserved.