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

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.TableAbstract<E>
      extended by org.omnaest.utils.structure.table.concrete.TableBasic<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:
ArrayTable

public abstract class TableBasic<E>
extends TableAbstract<E>

Declares the methods of basic subspecifications like TableSerializer, TableAdaptable

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>
 
Field Summary
protected  TableAdaptable.TableAdapterProvider<E> tableAdapterProvider
           
protected  TableCloneable.TableCloner<E> tableCloner
           
protected  TableSerializable.TableSerializer<E> tableSerializer
           
 
Constructor Summary
TableBasic()
           
 
Method Summary
 TableAdaptable.TableAdapterProvider<E> as()
           
 Iterable<Table.Cell<E>> cells()
          Iterable for the Tables Table.Cells.
 TableCloneable.TableCloner<E> clone()
          Returns the TableCloneable.TableCloner for the Table which allows to clone it.
 Iterable<Table.Column<E>> columns()
          Iterable over all Table.Columns
<TO> Table<TO>
convert(Table.TableCellConverter<E,TO> tableCellConverter)
          Converts the current Table into a new Table instance with another element type.
 Table<E> copyFrom(TableDataSource<E> tableDataSource)
          Clears the Table and copies the Table.CellImmutable.getElement() values from a given TableDataSource Copyies the cell
 boolean equals(Object object)
           
 boolean equals(TableCoreImmutable<E> table)
          Compares the data of two Table instances, if they are the same true is returned.
 Object getColumnTitleValue(int columnIndexPosition)
           
 List<Object> getColumnTitleValueList()
          Returns a new List of all Table.Columns Table.Stripe.Title.getValue() for the Table.
 Object getRowTitleValue(int rowIndexPosition)
           
 List<Object> getRowTitleValueList()
          Returns a new List with all the Table.Stripe.getTitleValue() for the Table.
protected abstract  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 abstract  List<Object> getStripeTitleValueList(Table.Stripe.StripeType stripeType)
          Returns the Table.Stripe.Title.getValue() elements within a List
 int hashCode()
           
 Iterator<Table.Row<E>> iterator()
          The same as #iteratorRow()
 Iterator<Table.Cell<E>> iteratorCell()
          Returns an Iterator that goes through every Table.Column for every Table.Row.
 Iterator<Table.Column<E>> iteratorColumn()
          Returns an Iterator over all Table.Columns
 Table<E> processTableCells(Table.TableCellVisitor<E> tableCellVisitor)
          Helper method to do arbitrary stuff on the Table Table.Cells.
 Table<E> putArray(E[][] elementArray, int rowIndexPosition, int columnIndexPosition)
          Puts an array into the table.
 Table<E> putTable(TableDataSource<E> tableDataSource, int rowIndexPosition, int columnIndexPosition)
          Puts a foreign table into the current table at the given index position.
 ListIterable<Table.Row<E>> rows()
          ListIterable over all Table.Rows
 TableSerializable.TableSerializer<E> serializer()
           
 Table<E> setColumnTitleValues(List<?> titleValueList)
          Sets the Table.Stripe.Titles of the Table.Columns.
 Table<E> setColumnTitleValues(Object... titleValues)
           
 Table<E> setRowTitleValues(List<?> titleValueList)
          Sets the Table.Stripe.Title for the Table.Rows.
 Table<E> setRowTitleValues(Object... titleValues)
           
protected abstract  void setStripeTitleValueList(List<?> titleValueList, Table.Stripe.StripeType row)
          Sets the Table.Stripe.Title.setValue(Object) of the Rows or Columns
 String 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
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableCore
addColumnCellElements, addColumnCellElements, addRowCellElements, addRowCellElements, clear, removeColumn, removeRow, setCellElement, setCellElement, setColumnTitleValue, setRowTitleValue, setTableName, transpose
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableCoreImmutable
getCell, getCell, getCell, getCell, getCell, getCellElement, getColumn, getColumn, getRow, getRow, getTableName, getTableSize
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableSelectable
select
 

Field Detail

tableSerializer

protected TableSerializable.TableSerializer<E> tableSerializer

tableAdapterProvider

protected TableAdaptable.TableAdapterProvider<E> tableAdapterProvider

tableCloner

protected TableCloneable.TableCloner<E> tableCloner
Constructor Detail

TableBasic

public TableBasic()
Method Detail

getStripeTitleValue

protected abstract 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)

Parameters:
stripeType -
indexPosition -
Returns:

getStripeTitleValueList

protected abstract List<Object> getStripeTitleValueList(Table.Stripe.StripeType stripeType)
Returns the Table.Stripe.Title.getValue() elements within a List

Parameters:
stripeType -
Returns:

setStripeTitleValueList

protected abstract void setStripeTitleValueList(List<?> titleValueList,
                                                Table.Stripe.StripeType row)
Sets the Table.Stripe.Title.setValue(Object) of the Rows or Columns

Parameters:
titleValueList -
stripeType -

setRowTitleValues

public Table<E> setRowTitleValues(List<?> titleValueList)
Description copied from interface: TableCore
Sets the Table.Stripe.Title for the Table.Rows. This means the visual identifiers at the left of the Table.

Returns:
this
See Also:
TableCore.setRowTitleValue(Object, int), TableCore.setRowTitleValues(Object...)

setColumnTitleValues

public Table<E> setColumnTitleValues(List<?> titleValueList)
Description copied from interface: TableCore
Sets the Table.Stripe.Titles of the Table.Columns. The Table.Stripe.Titles can be used to identify a Table.Column, or together with a Table.Row a single Table.Cell.

Returns:
See Also:
TableCore.setColumnTitleValues(Object...)

getRowTitleValueList

public List<Object> getRowTitleValueList()
Description copied from interface: TableCoreImmutable
Returns a new List with all the Table.Stripe.getTitleValue() for the Table.

Returns:
See Also:
TableCoreImmutable.getRowTitleValue(int)

getRowTitleValue

public Object getRowTitleValue(int rowIndexPosition)
Returns:
See Also:
TableCoreImmutable.getRowTitleValueList()

getColumnTitleValueList

public List<Object> getColumnTitleValueList()
Description copied from interface: TableCoreImmutable
Returns a new List of all Table.Columns Table.Stripe.Title.getValue() for the Table.

Returns:
See Also:
TableCoreImmutable.getColumnTitleValue(int)

getColumnTitleValue

public Object getColumnTitleValue(int columnIndexPosition)
Returns:
See Also:
TableCoreImmutable.getColumnTitleValueList()

iteratorCell

public Iterator<Table.Cell<E>> iteratorCell()
Description copied from interface: TableCoreImmutable
Returns an Iterator that goes through every Table.Column for every Table.Row. Starting from left to right and then downwards all the Table.Rows.

Returns:
See Also:
#iteratorRow(), TableCoreImmutable.iterator()

processTableCells

public Table<E> processTableCells(Table.TableCellVisitor<E> tableCellVisitor)
Description copied from interface: TableCoreImmutable
Helper method to do arbitrary stuff on the Table Table.Cells. The processor loops through every Table.Column of each Table.Row, giving a visitor the possibility to do various actions.

See Also:
Table.TableCellVisitor

convert

public <TO> Table<TO> convert(Table.TableCellConverter<E,TO> tableCellConverter)
Description copied from interface: TableCoreImmutable
Converts the current Table into a new Table instance with another element type.

Returns:
See Also:
Table.TableCellConverter

iterator

public Iterator<Table.Row<E>> iterator()
Description copied from interface: TableCoreImmutable
The same as #iteratorRow()

Returns:
See Also:
#iteratorRow(), TableCoreImmutable.iteratorCell()

putTable

public Table<E> putTable(TableDataSource<E> tableDataSource,
                         int rowIndexPosition,
                         int columnIndexPosition)
Description copied from interface: TableCore
Puts a foreign table into the current table at the given index position. This means, if there are already filled cells, they will be overwritten.

Returns:
this

cells

public Iterable<Table.Cell<E>> cells()
Description copied from interface: TableCoreImmutable
Iterable for the Tables Table.Cells.

Returns:
See Also:
TableCoreImmutable.iteratorCell()

rows

public ListIterable<Table.Row<E>> rows()
Description copied from interface: TableCoreImmutable
ListIterable over all Table.Rows

Returns:

columns

public Iterable<Table.Column<E>> columns()
Description copied from interface: TableCoreImmutable
Iterable over all Table.Columns

Returns:

putArray

public Table<E> putArray(E[][] elementArray,
                         int rowIndexPosition,
                         int columnIndexPosition)
Description copied from interface: TableCore
Puts an array into the table. If there are already filled cells on the given position, they will be overwritten.

Returns:
this

iteratorColumn

public Iterator<Table.Column<E>> iteratorColumn()
Description copied from interface: TableCoreImmutable
Returns an Iterator over all Table.Columns

Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

equals

public boolean equals(TableCoreImmutable<E> table)
Description copied from interface: TableCoreImmutable
Compares the data of two Table instances, if they are the same true is returned.
Titles are not compared.

Returns:

toString

public String toString()
Overrides:
toString in class Object

serializer

public TableSerializable.TableSerializer<E> serializer()
Returns:
See Also:
TableSerializable.TableSerializer

copyFrom

public Table<E> copyFrom(TableDataSource<E> tableDataSource)
Description copied from interface: TableAdaptable
Clears the Table and copies the Table.CellImmutable.getElement() values from a given TableDataSource Copyies the cell

Returns:
this

setRowTitleValues

public Table<E> setRowTitleValues(Object... titleValues)
Returns:
See Also:
TableCore.setRowTitleValues(List)

setColumnTitleValues

public Table<E> setColumnTitleValues(Object... titleValues)
Returns:
See Also:
TableCore.setColumnTitleValues(List)

as

public TableAdaptable.TableAdapterProvider<E> as()
Returns:
See Also:
TableAdaptable.TableAdapterProvider

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 TableAbstract<E>
Returns:
Throws:
CloneNotSupportedException


Copyright © 2011. All Rights Reserved.