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, setSizeclear, clone, contains, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitappendColumn, 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, toArrayequals, hashCode, replaceAll, sort, spliteratorparallelStream, removeIf, streampublic AbstractTable()
public AbstractTable(int colCount,
int rowCount)
public void setColumnCount(int colCount)
Tablepublic ArrayList<C> insertColumns(int col, int count)
Tablepublic int getRowCount()
Tablepublic void setRowCount(int rowCount)
Tablepublic void removeRows(int row,
int count)
Tablepublic String getRowHeader(int row)
Tablepublic void setRowHeader(int row,
String header)
Tablepublic void set(String colHeader, int row, T value)
Tablepublic boolean add(C column)
TableUpdates 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)
TableUpdates 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)
TableUpdates 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)
TableUpdates the row count if necessary, and scales the columns to match the row count if necessary.
Copyright © 2015–2022 SciJava. All rights reserved.