org.omnaest.utils.structure.table.subspecification
Interface TableCoreImmutable<E>

Type Parameters:
E -
All Superinterfaces:
Serializable, TableCloneable<E>, TableDataSource<E>
All Known Subinterfaces:
Table<E>, TableCore<E>, TableView<E>
All Known Implementing Classes:
ArrayTable, SelectionExecutor.ArrayTableWithAccessibleTableInternal, TableAbstract, TableBasic, TableViewImpl

public interface TableCoreImmutable<E>
extends TableCloneable<E>, TableDataSource<E>, Serializable

This TableCoreImmutable provides core methods which do not change the Table structure.

Author:
Omnaest

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.omnaest.utils.structure.table.subspecification.TableCloneable
TableCloneable.TableCloner<E>
 
Method Summary
 Iterable<Table.Cell<E>> cells()
          Iterable for the Tables Table.Cells.
 Iterable<Table.Column<E>> columns()
          Iterable over all Table.Columns
 boolean contains(E element)
          Returns true, if the whole Table contains the given element.
<TO> Table<TO>
convert(Table.TableCellConverter<E,TO> tableCellConverter)
          Converts the current Table into a new Table instance with another element type.
 boolean equals(TableCoreImmutable<E> table)
          Compares the data of two Table instances, if they are the same true is returned.
 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
 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.
 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.
 List<Table.Column<E>> getColumnList()
          Returns a List of all Table.Columns
 Object getColumnTitleValue(int columnIndexPosition)
           
 List<Object> getColumnTitleValueList()
          Returns a new List of all Table.Columns Table.Stripe.Title.getValue() for the Table.
 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
 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.
 List<Table.Row<E>> getRowList()
          Returns a List of all Table.Rows
 Object getRowTitleValue(int rowIndexPosition)
           
 List<Object> getRowTitleValueList()
          Returns a new List with all the Table.Stripe.getTitleValue() for the Table.
 Object getTableName()
          Returns the name for the whole table.
 Table.TableSize getTableSize()
          Returns a Table.TableSize object for the table.
 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 getTableName() is not null
 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.
 ListIterable<Table.Row<E>> rows()
          ListIterable over all Table.Rows
 
Methods inherited from interface org.omnaest.utils.structure.table.subspecification.TableCloneable
clone
 

Method Detail

equals

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

Returns:

getRowTitleValueList

List<Object> getRowTitleValueList()
Returns a new List with all the Table.Stripe.getTitleValue() for the Table.

Specified by:
getRowTitleValueList in interface TableDataSource<E>
Returns:
See Also:
getRowTitleValue(int)

getRowTitleValue

Object getRowTitleValue(int rowIndexPosition)
Parameters:
rowIndexPosition -
Returns:
See Also:
getRowTitleValueList()

getColumnTitleValueList

List<Object> getColumnTitleValueList()
Returns a new List of all Table.Columns Table.Stripe.Title.getValue() for the Table.

Specified by:
getColumnTitleValueList in interface TableDataSource<E>
Returns:
See Also:
getColumnTitleValue(int)

getColumnTitleValue

Object getColumnTitleValue(int columnIndexPosition)
Parameters:
columnIndexPosition -
Returns:
See Also:
getColumnTitleValueList()

getTableSize

Table.TableSize getTableSize()
Returns a Table.TableSize object for the table. The object will have always actual results, that will change if the data of the Table is changed.

Returns:

getTableName

Object getTableName()
Returns the name for the whole table.

Specified by:
getTableName in interface TableDataSource<E>
Returns:

getCellElement

E getCellElement(int rowIndexPosition,
                 int columnIndexPosition)
Resolves an element from the table at the given index positions.

Parameters:
rowIndexPosition -
columnIndexPosition -
Returns:
See Also:
getCellElement(int)

getCellElement

E getCellElement(int cellIndexPosition)
Returns the Table.CellImmutable.getElement() for the given Table.Cell index position

Parameters:
cellIndexPosition -
Returns:
See Also:
getCellElement(int, int), getCellElementList()

getCellElementList

List<E> getCellElementList()
Returns a new List of all Table.Cell instances of the Table serialized .

Returns:
See Also:
getCellElement(int)

getCell

Table.Cell<E> getCell(int rowIndexPosition,
                      int columnIndexPosition)
Resolves the Table.Cell for the given index positions.

Parameters:
rowIndexPosition -
columnIndexPosition -
Returns:

getCell

Table.Cell<E> getCell(int cellIndexPosition)
Returns the Table.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.

Parameters:
cellIndexPosition -
Returns:

getCell

Table.Cell<E> getCell(String rowTitleValue,
                      String columnTitleValue)
Parameters:
rowTitleValue -
columnTitleValue -
Returns:
See Also:
getCell(int, int)

getCell

Table.Cell<E> getCell(Object rowTitleValue,
                      int columnIndexPosition)
Parameters:
rowTitleValue -
columnIndexPosition -
Returns:
See Also:
getCell(int, int)

getCell

Table.Cell<E> getCell(int rowIndexPosition,
                      Object columnTitleValue)
Parameters:
rowIndexPosition -
columnTitleValue -
Returns:
See Also:
getCell(int, int)

getCellList

List<Table.Cell<E>> getCellList()
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.

Returns:
See Also:
TableCore

getRow

Table.Row<E> getRow(int rowIndexPosition)
Returns a new list that holds the object of the row pointed to.

Parameters:
rowIndexPosition -
Returns:

getRowList

List<Table.Row<E>> getRowList()
Returns a List of all Table.Rows


getRow

Table.Row<E> getRow(Object rowTitleValue)
Returns a Table.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)

Parameters:
rowTitleValue -
Returns:
See Also:
getRow(int)

getColumn

Table.Column<E> getColumn(int columnIndexPosition)
Returns a Table.Column for the given Table.Column index position.

Parameters:
columnIndexPosition -
Returns:
See Also:
getColumn(Object)

getColumnList

List<Table.Column<E>> getColumnList()
Returns a List of all Table.Columns

Returns:

getColumn

Table.Column<E> getColumn(Object columnTitleValue)
Returns a Table.Column for the given Table.Column title value. The Table.Column titles have to be set before with #setColumnTitleValues(List)

Parameters:
columnTitleValue -
Returns:
See Also:
getColumn(int)

getLastRow

Table.Row<E> getLastRow()
Returns the last Table.Row of the Table

Returns:

getLastColumn

Table.Column<E> getLastColumn()
Returns the last Table.Column of the Table

Returns:

getFirstRow

Table.Row<E> getFirstRow()
Returns the first Table.Row of the Table

Returns:

getFirstColumn

Table.Column<E> getFirstColumn()
Returns the first Table.Column of the Table

Returns:

contains

boolean contains(E element)
Returns true, if the whole Table contains the given element.

Parameters:
element -
Returns:

iteratorCell

Iterator<Table.Cell<E>> iteratorCell()
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(), iterator()

cells

Iterable<Table.Cell<E>> cells()
Iterable for the Tables Table.Cells.

Returns:
See Also:
iteratorCell()

rows

ListIterable<Table.Row<E>> rows()
ListIterable over all Table.Rows

Specified by:
rows in interface TableDataSource<E>
Returns:

columns

Iterable<Table.Column<E>> columns()
Iterable over all Table.Columns

Returns:

iteratorColumn

Iterator<Table.Column<E>> iteratorColumn()
Returns an Iterator over all Table.Columns

Returns:

iterator

Iterator<Table.Row<E>> iterator()
The same as #iteratorRow()

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

convert

<TO> Table<TO> convert(Table.TableCellConverter<E,TO> tableCellConverter)
Converts the current Table into a new Table instance with another element type.

Parameters:
tableCellConverter -
Returns:
See Also:
Table.TableCellConverter

processTableCells

Table<E> processTableCells(Table.TableCellVisitor<E> tableCellVisitor)
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.

Parameters:
tableCellVisitor -
See Also:
Table.TableCellVisitor

hasColumnTitles

boolean hasColumnTitles()
Returns true if at least one Table.Column has a Table.Stripe.Title

Returns:

hasRowTitles

boolean hasRowTitles()
Returns true if at least one Table.Row has a Table.Stripe.Title

Returns:

hasTableName

boolean hasTableName()
Returns true if the getTableName() is not null

Returns:


Copyright © 2011. All Rights Reserved.