org.omnaest.utils.structure.table.concrete
Class TableAbstract<E>

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.TableAbstract<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, Iterable<Table.Row<E>>, TableAdaptable<E>, TableCloneable<E>, TableCore<E>, TableCoreImmutable<E>, TableDataSource<E>, TableSelectable<E>, TableSerializable<E>, Table<E>
Direct Known Subclasses:
TableBasic

public abstract class TableAbstract<E>
extends Object
implements Table<E>

Implements all facade methods which are only operating on the facade itself

Author:
Omnaest
See Also:
Table, TableSerializer, Serialized Form

Nested Class Summary
 
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>
 
Constructor Summary
protected TableAbstract()
           
 
Method Summary
 TableCloneable.TableCloner<E> clone()
          Returns the TableCloneable.TableCloner for the Table which allows to clone it.
 boolean contains(E element)
          Returns true, if the whole Table contains the given element.
 Table<E> convertFirstColumnToTitle()
          Converts the first column to row titles.
 Table<E> convertFirstRowToTitle()
          Takes the first row of the table converts it to text and removes it from the table.
 Table<E> ensureNumberOfColumns(int numberOfColumns)
          Ensures the number of Table.Columns to be present
 Table<E> ensureNumberOfRows(int numberOfRows)
          Ensures the number of Table.Rows to be present
 E getCellElement(int rowIndexPosition, int columnIndexPosition)
          Resolves an element from the table at the given index positions.
 List<E> getCellElementList()
          Returns a new List of all Table.Cell instances of the Table serialized .
 List<Table.Cell<E>> getCellList()
          Returns a to the table backed list of all cells.
 List<Table.Column<E>> getColumnList()
          Returns a List of all Table.Columns
 Table.Column<E> getFirstColumn()
          Returns the first Table.Column of the Table
 Table.Row<E> getFirstRow()
          Returns the first Table.Row of the Table
 Table.Column<E> getLastColumn()
          Returns the last Table.Column of the Table
 Table.Row<E> getLastRow()
          Returns the last Table.Row of the Table
 List<Table.Row<E>> getRowList()
          Returns a List of all Table.Rows
 boolean hasColumnTitles()
          Returns true if at least one Table.Column has a Table.Stripe.Title
 boolean hasRowTitles()
          Returns true if at least one Table.Row has a Table.Stripe.Title
 boolean hasTableName()
          Returns true if the TableCoreImmutable.getTableName() is not null
 List<E> removeColumn(Table.Column<E> column)
          Removes the given Table.Column from the Table
 List<E> removeRow(Table.Row<E> row)
          Removes the given Table.Row from the Table
 List<List<E>> removeRows(int[] rowIndexPositions)
          Removes all the given rows.
 Table<E> setColumnCellElements(int columnIndexPosition, List<? extends E> columnCellElementList)
          Puts a column at the given column index position.
 Table<E> setNumberOfColumns(int numberOfColumns)
          Sets the number of Table.Columns
 Table<E> setNumberOfRows(int numberOfRows)
          Sets the number of Table.Rows
 Table<E> setRowCellElements(int rowIndexPosition, List<? extends E> rowCellElementList)
          Puts a row at the given row index position
 Table<E> truncateRows(int rowIndexPosition)
          Deletes all Table.Rows including the given Table.Row index position to the end of the Table
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableCore
addColumnCellElements, addColumnCellElements, addRowCellElements, addRowCellElements, clear, putArray, putTable, removeColumn, removeRow, setCellElement, setCellElement, setColumnTitleValue, setColumnTitleValues, setColumnTitleValues, setRowTitleValue, setRowTitleValues, setRowTitleValues, setTableName, transpose
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableCoreImmutable
cells, columns, convert, equals, getCell, getCell, getCell, getCell, getCell, getCellElement, getColumn, getColumn, getColumnTitleValue, getColumnTitleValueList, getRow, getRow, getRowTitleValue, getRowTitleValueList, getTableName, getTableSize, iterator, iteratorCell, iteratorColumn, processTableCells, rows
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableSelectable
select
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableSerializable
serializer
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableAdaptable
as, copyFrom
 

Constructor Detail

TableAbstract

protected TableAbstract()
Method Detail

getCellElement

public E getCellElement(int rowIndexPosition,
                        int columnIndexPosition)
Description copied from interface: TableCoreImmutable
Resolves an element from the table at the given index positions.

Specified by:
getCellElement in interface TableCoreImmutable<E>
Returns:
See Also:
TableCoreImmutable.getCellElement(int)

removeRows

public List<List<E>> removeRows(int[] rowIndexPositions)
Description copied from interface: TableCore
Removes all the given rows.

Specified by:
removeRows in interface TableCore<E>
Returns:

truncateRows

public Table<E> truncateRows(int rowIndexPosition)
Description copied from interface: TableCore
Deletes all Table.Rows including the given Table.Row index position to the end of the Table

Specified by:
truncateRows in interface TableCore<E>
Returns:

setRowCellElements

public Table<E> setRowCellElements(int rowIndexPosition,
                                   List<? extends E> rowCellElementList)
Description copied from interface: TableCore
Puts a row at the given row index position

Specified by:
setRowCellElements in interface TableCore<E>
Returns:
this

setColumnCellElements

public Table<E> setColumnCellElements(int columnIndexPosition,
                                      List<? extends E> columnCellElementList)
Description copied from interface: TableCore
Puts a column at the given column index position.

Specified by:
setColumnCellElements in interface TableCore<E>
Returns:

contains

public boolean contains(E element)
Description copied from interface: TableCoreImmutable
Returns true, if the whole Table contains the given element.

Specified by:
contains in interface TableCoreImmutable<E>
Returns:

convertFirstRowToTitle

public Table<E> convertFirstRowToTitle()
Description copied from interface: TableCore
Takes the first row of the table converts it to text and removes it from the table.

Specified by:
convertFirstRowToTitle in interface TableCore<E>
Returns:
this

convertFirstColumnToTitle

public Table<E> convertFirstColumnToTitle()
Description copied from interface: TableCore
Converts the first column to row titles. The first column will be removed from the table data.

Specified by:
convertFirstColumnToTitle in interface TableCore<E>
Returns:
this

getCellList

public List<Table.Cell<E>> getCellList()
Description copied from interface: TableCoreImmutable
Returns a to the table backed list of all cells. The cells are ordered from the first row from the left column to right column, to the last row from the left column to the right column.

Specified by:
getCellList in interface TableCoreImmutable<E>
Returns:
See Also:
TableCore

getCellElementList

public List<E> getCellElementList()
Description copied from interface: TableCoreImmutable
Returns a new List of all Table.Cell instances of the Table serialized .

Specified by:
getCellElementList in interface TableCoreImmutable<E>
Returns:
See Also:
TableCoreImmutable.getCellElement(int)

getRowList

public List<Table.Row<E>> getRowList()
Description copied from interface: TableCoreImmutable
Returns a List of all Table.Rows

Specified by:
getRowList in interface TableCoreImmutable<E>

getColumnList

public List<Table.Column<E>> getColumnList()
Description copied from interface: TableCoreImmutable
Returns a List of all Table.Columns

Specified by:
getColumnList in interface TableCoreImmutable<E>
Returns:

hasColumnTitles

public boolean hasColumnTitles()
Description copied from interface: TableCoreImmutable
Returns true if at least one Table.Column has a Table.Stripe.Title

Specified by:
hasColumnTitles in interface TableCoreImmutable<E>
Returns:

hasTableName

public boolean hasTableName()
Description copied from interface: TableCoreImmutable
Returns true if the TableCoreImmutable.getTableName() is not null

Specified by:
hasTableName in interface TableCoreImmutable<E>
Returns:

hasRowTitles

public boolean hasRowTitles()
Description copied from interface: TableCoreImmutable
Returns true if at least one Table.Row has a Table.Stripe.Title

Specified by:
hasRowTitles in interface TableCoreImmutable<E>
Returns:

setNumberOfColumns

public Table<E> setNumberOfColumns(int numberOfColumns)
Description copied from interface: TableCore
Sets the number of Table.Columns

Specified by:
setNumberOfColumns in interface TableCore<E>
Returns:
this

ensureNumberOfColumns

public Table<E> ensureNumberOfColumns(int numberOfColumns)
Description copied from interface: TableCore
Ensures the number of Table.Columns to be present

Specified by:
ensureNumberOfColumns in interface TableCore<E>
Returns:
this

setNumberOfRows

public Table<E> setNumberOfRows(int numberOfRows)
Description copied from interface: TableCore
Sets the number of Table.Rows

Specified by:
setNumberOfRows in interface TableCore<E>
Returns:
this

ensureNumberOfRows

public Table<E> ensureNumberOfRows(int numberOfRows)
Description copied from interface: TableCore
Ensures the number of Table.Rows to be present

Specified by:
ensureNumberOfRows in interface TableCore<E>
Returns:
this

removeColumn

public List<E> removeColumn(Table.Column<E> column)
Description copied from interface: TableCore
Removes the given Table.Column from the Table

Specified by:
removeColumn in interface TableCore<E>
Returns:

removeRow

public List<E> removeRow(Table.Row<E> row)
Description copied from interface: TableCore
Removes the given Table.Row from the Table

Specified by:
removeRow in interface TableCore<E>
Returns:

getLastRow

public Table.Row<E> getLastRow()
Description copied from interface: TableCoreImmutable
Returns the last Table.Row of the Table

Specified by:
getLastRow in interface TableCoreImmutable<E>
Returns:

getLastColumn

public Table.Column<E> getLastColumn()
Description copied from interface: TableCoreImmutable
Returns the last Table.Column of the Table

Specified by:
getLastColumn in interface TableCoreImmutable<E>
Returns:

getFirstRow

public Table.Row<E> getFirstRow()
Description copied from interface: TableCoreImmutable
Returns the first Table.Row of the Table

Specified by:
getFirstRow in interface TableCoreImmutable<E>
Returns:

getFirstColumn

public Table.Column<E> getFirstColumn()
Description copied from interface: TableCoreImmutable
Returns the first Table.Column of the Table

Specified by:
getFirstColumn in interface TableCoreImmutable<E>
Returns:

clone

public TableCloneable.TableCloner<E> clone()
                                    throws CloneNotSupportedException
Description copied from interface: TableCloneable
Returns the TableCloneable.TableCloner for the Table which allows to clone it.

Specified by:
clone in interface TableCloneable<E>
Overrides:
clone in class Object
Returns:
Throws:
CloneNotSupportedException


Copyright © 2011. All Rights Reserved.