|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.structure.table.concrete.TableAbstract<E>
org.omnaest.utils.structure.table.concrete.TableBasic<E>
org.omnaest.utils.structure.table.concrete.ArrayTable<E>
public class ArrayTable<E>
Implementation of Table which has a rich underlying structure based on ArrayLists, HashSet and
HashMap.
Table,
Serialized Form| Nested Class Summary | |
|---|---|
class |
ArrayTable.ArrayTableInternal
|
| Nested classes/interfaces inherited from interface org.omnaest.utils.structure.table.Table |
|---|
Table.Cell<E>, Table.CellImmutable<E>, Table.Column<E>, Table.Row<E>, Table.Stripe<E>, Table.TableCellConverter<FROM,TO>, Table.TableCellVisitor<E>, Table.TableComponent, Table.TableSize |
| Nested classes/interfaces inherited from interface org.omnaest.utils.structure.table.subspecification.TableCloneable |
|---|
TableCloneable.TableCloner<E> |
| Nested classes/interfaces inherited from interface org.omnaest.utils.structure.table.subspecification.TableSelectable |
|---|
TableSelectable.Predicate<E>, TableSelectable.Selection<E>, TableSelectable.SelectionJoin<E>, TableSelectable.Where<E> |
| Nested classes/interfaces inherited from interface org.omnaest.utils.structure.table.subspecification.TableSerializable |
|---|
TableSerializable.TableSerializer<E> |
| Nested classes/interfaces inherited from interface org.omnaest.utils.structure.table.subspecification.TableAdaptable |
|---|
TableAdaptable.TableAdapterProvider<E> |
| Field Summary | |
|---|---|
protected TableInternal.CellAndStripeResolver<E> |
cellAndStripeResolver
|
protected StripeFactory<E> |
stripeFactory
|
protected TableInternal.TableContent<E> |
tableContent
|
protected TableInternal.TableContentResolver<E> |
tableContentResolver
|
protected TableInternal<E> |
tableInternal
|
protected Object |
tableName
|
| Fields inherited from class org.omnaest.utils.structure.table.concrete.TableBasic |
|---|
tableAdapterProvider, tableCloner, tableSerializer |
| Constructor Summary | |
|---|---|
ArrayTable()
|
|
ArrayTable(E[][] elementArray)
|
|
| Method Summary | |
|---|---|
Table.Column<E> |
addColumnCellElements(int columnIndexPosition,
List<? extends E> columnCellElementList)
Adds a Table.Column to the Table with the given Table.CellImmutable.getElement()s at the given index position of the
Table.Columns. |
Table.Column<E> |
addColumnCellElements(List<? extends E> columnCellElementList)
Adds a Table.Column to the Table with the given Table.CellImmutable.getElement()s at the end of the Table.Columns. |
Table.Row<E> |
addRowCellElements(int rowIndexPosition,
List<? extends E> rowCellElementList)
Adds a new Table.Row to the Table at the given index position. |
Table.Row<E> |
addRowCellElements(List<? extends E> rowCellElementList)
Adds a new row to the table. |
Table<E> |
clear()
Clears the table, so that there are no elements left. |
Table.Cell<E> |
getCell(int cellIndexPosition)
Returns the Table.Cell determined by the given Table.Cell index position. |
Table.Cell<E> |
getCell(int rowIndexPosition,
int columnIndexPosition)
Resolves the Table.Cell for the given index positions. |
Table.Cell<E> |
getCell(int rowIndexPosition,
Object columnTitleValue)
|
Table.Cell<E> |
getCell(Object rowTitleValue,
int columnIndexPosition)
|
Table.Cell<E> |
getCell(String rowTitleValue,
String columnTitleValue)
|
E |
getCellElement(int cellIndexPosition)
Returns the Table.CellImmutable.getElement() for the given Table.Cell index position |
Table.Column<E> |
getColumn(int columnIndexPosition)
Returns a Table.Column for the given Table.Column index position. |
Table.Column<E> |
getColumn(Object columnTitleValue)
Returns a Table.Column for the given Table.Column title value. |
Table.Row<E> |
getRow(int rowIndexPosition)
Returns a new list that holds the object of the row pointed to. |
Table.Row<E> |
getRow(Object rowTitleValue)
Returns a Table.Row of the Table identified by the title of a row. |
protected Object |
getStripeTitleValue(Table.Stripe.StripeType stripeType,
int indexPosition)
Returns the Table.Stripe.Title.getValue() object for the given index position within the respective
TableContent#getStripeDataList(StripeType) |
protected List<Object> |
getStripeTitleValueList(Table.Stripe.StripeType stripeType)
Returns the Table.Stripe.Title.getValue() elements within a List |
protected TableInternal<E> |
getTableInternal()
|
Object |
getTableName()
Returns the name for the whole table. |
Table.TableSize |
getTableSize()
Returns a Table.TableSize object for the table. |
List<E> |
removeColumn(int columnIndexPosition)
Removes a Table.Column at the given index position from the Table. |
List<E> |
removeRow(int rowIndexPosition)
Removes a Table.Row at the given index position from the Table. |
TableSelectable.Selection<E> |
select()
A TableSelectable.Selection offers methods to select a subset of Table.Rows and Table.Columns of a Table and provide the
result as further Table or TableView |
Table<E> |
setCellElement(int cellIndexPosition,
E element)
Puts a new element to the table at the defined cell index position. |
Table<E> |
setCellElement(int rowIndexPosition,
int columnIndexPosition,
E element)
Puts a new element to the table at the defined index positions. |
Table<E> |
setColumnTitleValue(Object titleValue,
int columnIndexPosition)
Sets the title of a column for a given column index position. |
Table<E> |
setRowTitleValue(Object titleValue,
int rowIndexPosition)
Sets the Table.Stripe.Title for a Table.Row with the given index position. |
protected void |
setStripeTitleValueList(List<? extends Object> titleValueList,
Table.Stripe.StripeType stripeType)
Sets the Table.Stripe.Title.setValue(Object) of the Rows or Columns |
Table<E> |
setTableName(Object tableName)
Sets the name of the whole table. |
Table<E> |
transpose()
Transposes the whole table, which means to swap rows and columns. |
| Methods inherited from class org.omnaest.utils.structure.table.concrete.TableBasic |
|---|
as, cells, clone, columns, convert, copyFrom, equals, equals, getColumnTitleValue, getColumnTitleValueList, getRowTitleValue, getRowTitleValueList, hashCode, iterator, iteratorCell, iteratorColumn, processTableCells, putArray, putTable, rows, serializer, setColumnTitleValues, setColumnTitleValues, setRowTitleValues, setRowTitleValues, toString |
| Methods inherited from class org.omnaest.utils.structure.table.concrete.TableAbstract |
|---|
contains, convertFirstColumnToTitle, convertFirstRowToTitle, ensureNumberOfColumns, ensureNumberOfRows, getCellElement, getCellElementList, getCellList, getColumnList, getFirstColumn, getFirstRow, getLastColumn, getLastRow, getRowList, hasColumnTitles, hasRowTitles, hasTableName, removeColumn, removeRow, removeRows, setColumnCellElements, setNumberOfColumns, setNumberOfRows, setRowCellElements, truncateRows |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected TableInternal<E> tableInternal
protected TableInternal.TableContentResolver<E> tableContentResolver
protected Object tableName
protected StripeFactory<E> stripeFactory
protected TableInternal.TableContent<E> tableContent
protected TableInternal.CellAndStripeResolver<E> cellAndStripeResolver
| Constructor Detail |
|---|
public ArrayTable()
ArrayTablepublic ArrayTable(E[][] elementArray)
elementArray - TableBasic.putArray(Object[][], int, int)| Method Detail |
|---|
public Table<E> setRowTitleValue(Object titleValue,
int rowIndexPosition)
TableCoreTable.Stripe.Title for a Table.Row with the given index position.
TableCoreImmutable.getRowTitleValue(int)
protected void setStripeTitleValueList(List<? extends Object> titleValueList,
Table.Stripe.StripeType stripeType)
TableBasicTable.Stripe.Title.setValue(Object) of the Rows or Columns
setStripeTitleValueList in class TableBasic<E>
public Table<E> setColumnTitleValue(Object titleValue,
int columnIndexPosition)
TableCore
protected List<Object> getStripeTitleValueList(Table.Stripe.StripeType stripeType)
TableBasicTable.Stripe.Title.getValue() elements within a List
getStripeTitleValueList in class TableBasic<E>
protected Object getStripeTitleValue(Table.Stripe.StripeType stripeType,
int indexPosition)
TableBasicTable.Stripe.Title.getValue() object for the given index position within the respective
TableContent#getStripeDataList(StripeType)
getStripeTitleValue in class TableBasic<E>public Table.TableSize getTableSize()
TableCoreImmutableTable.TableSize object for the table. The object will have always actual results, that will change if the data of
the Table is changed.
public Table<E> setCellElement(int rowIndexPosition,
int columnIndexPosition,
E element)
TableCore
public Table.Cell<E> getCell(int rowIndexPosition,
int columnIndexPosition)
TableCoreImmutableTable.Cell for the given index positions.
public Table.Column<E> addColumnCellElements(List<? extends E> columnCellElementList)
TableCoreTable.Column to the Table with the given Table.CellImmutable.getElement()s at the end of the Table.Columns.
public Table.Column<E> addColumnCellElements(int columnIndexPosition,
List<? extends E> columnCellElementList)
TableCoreTable.Column to the Table with the given Table.CellImmutable.getElement()s at the given index position of the
Table.Columns. Already existing Table.Columns at this index position will be moved one index position further. If the
index position is above the size of the current Table.Columns, as many Table.Columns are created as necessary to make the
Table.Column available at the given index position.
public Table.Row<E> addRowCellElements(List<? extends E> rowCellElementList)
TableCore
public Table.Row<E> addRowCellElements(int rowIndexPosition,
List<? extends E> rowCellElementList)
TableCoreTable.Row to the Table at the given index position. If there is already a Table.Row or following
Table.Rows for the given index position, they are moved one index position forward. If the index position is out of bounds
as many Table.Rows are created to make it possible to access the Table.Row at the given index position.
public List<E> removeRow(int rowIndexPosition)
TableCoreTable.Row at the given index position from the Table.
List of Table.CellImmutable.getElement() instances of the removed Table.Rowpublic List<E> removeColumn(int columnIndexPosition)
TableCoreTable.Column at the given index position from the Table.
List of Table.CellImmutable.getElement() instances of the removed Table.Columnpublic Table.Row<E> getRow(int rowIndexPosition)
TableCoreImmutable
public Table.Row<E> getRow(Object rowTitleValue)
TableCoreImmutableTable.Row of the Table identified by the title of a row. Before this can be used, the titles have to be
set by #setRowTitleValues(List)
TableCoreImmutable.getRow(int)public Table.Column<E> getColumn(int columnIndexPosition)
TableCoreImmutableTable.Column for the given Table.Column index position.
TableCoreImmutable.getColumn(Object)public Table.Column<E> getColumn(Object columnTitleValue)
TableCoreImmutableTable.Column for the given Table.Column title value. The Table.Column titles have to be set before with
#setColumnTitleValues(List)
TableCoreImmutable.getColumn(int)public Table<E> clear()
TableCore
public Object getTableName()
TableCoreImmutable
public Table<E> setTableName(Object tableName)
TableCore
public Table.Cell<E> getCell(int cellIndexPosition)
TableCoreImmutableTable.Cell determined by the given Table.Cell index position. The Table.Cell index position starts with 0
and increases horizontally with each Table.Column and this through every single Table.Row down to the bottom of the
Table. Returns null if the Table.Cell index position is out of Table bounds.
public Table<E> setCellElement(int cellIndexPosition,
E element)
TableCore
public Table<E> transpose()
TableCore
public Table.Cell<E> getCell(String rowTitleValue,
String columnTitleValue)
TableCoreImmutable.getCell(int, int)
public Table.Cell<E> getCell(Object rowTitleValue,
int columnIndexPosition)
TableCoreImmutable.getCell(int, int)
public Table.Cell<E> getCell(int rowIndexPosition,
Object columnTitleValue)
TableCoreImmutable.getCell(int, int)public E getCellElement(int cellIndexPosition)
TableCoreImmutableTable.CellImmutable.getElement() for the given Table.Cell index position
TableCoreImmutable.getCellElement(int, int),
TableCoreImmutable.getCellElementList()public TableSelectable.Selection<E> select()
TableSelectableTableSelectable.Selection offers methods to select a subset of Table.Rows and Table.Columns of a Table and provide the
result as further Table or TableView
TableSelectable.Selection,
Tableprotected TableInternal<E> getTableInternal()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||