org.omnaest.utils.structure.table.concrete.internal
Class CellAndStripeResolverAbstract<E>

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.internal.CellAndStripeResolverAbstract<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, TableInternal.CellAndStripeResolver<E>, TableInternal.TableComponentInternal, Table.TableComponent
Direct Known Subclasses:
CellAndStripeResolverImpl

public abstract class CellAndStripeResolverAbstract<E>
extends Object
implements TableInternal.CellAndStripeResolver<E>

Author:
Omnaest
See Also:
TableInternal.CellAndStripeResolver, Serialized Form

Constructor Summary
CellAndStripeResolverAbstract()
           
 
Method Summary
protected abstract  int determineColumnIndexPositionForCellIndexPosition(int cellIndexPosition)
           
protected abstract  int determineRowIndexPositionForCellIndexPosition(int cellIndexPosition)
           
 Table.Cell<E> resolveCell(int cellIndexPosition)
          Resolves a Table.Cell by its Table.Cell index position.
 Table.Cell<E> resolveCell(int rowIndexPosition, int columnIndexPosition)
          Resolves the Table.Cell for the given index positions.
 Table.Cell<E> resolveCell(int rowIndexPosition, Object columnTitleValue)
          Resolves a Table.Cell by the Table.Row index position and the Table.Column title value
 Table.Cell<E> resolveCell(int rowIndexPosition, TableInternal.StripeInternal<E> column)
          Resolves a Table.Cell by a row index position and a Table.Column.
 Table.Cell<E> resolveCell(Object rowTitleValue, int columnIndexPosition)
          Resolves a Table.Cell by the Table.Row title value and the Table.Column index position
 Table.Cell<E> resolveCell(Object rowTitleValue, Object columnTitleValue)
          Resolves a Table.Cell by the Table.Row title value and the Table.Column title value
 Table.Cell<E> resolveCell(Object rowTitleValue, TableInternal.StripeInternal<E> column)
          Resolves a Table.Cell by the Table.Stripe.Title.getValue() of the Table.Row and the Table.Column
 Table.Cell<E> resolveCell(TableInternal.StripeInternal<E> row, int columnIndexPosition)
          Resolves a Table.Cell for the given Table.Row and Table.Column index position.
 Table.Cell<E> resolveCell(TableInternal.StripeInternal<E> row, Object columnTitleValue)
          Resolves a Table.Cell by the Table.Row and the Table.Stripe.Title.getValue() of the Table.Column
 Table.Cell<E> resolveCell(TableInternal.StripeInternal<E> row, TableInternal.StripeInternal<E> column)
          Resolves a Table.Cell by a given Table.Row and Table.Column
 TableInternal.StripeData<E> resolveColumnStripeData(int columnIndexPosition)
          Resolves a ColumnInternal for the given Table.Column index position.
 TableInternal.StripeData<E> resolveColumnStripeData(Object titleValue)
          Resolves the Table.Column by the given Table.Stripe.Title.getValue()
 Table.Cell<E> resolveOrCreateCell(int cellIndexPosition)
          Resolves a Table.Cell by its Table.Cell index position or creates it if it cannot be resolved.
 Table.Cell<E> resolveOrCreateCell(int rowIndexPosition, int columnIndexPosition)
          Resolves a Table.Cell by its Table.Row and Table.Column index positions.
 Table.Cell<E> resolveOrCreateCell(int rowIndexPosition, TableInternal.StripeInternal<E> column)
          Tries to resolve a Table.Cell by the given Table.Row index position and a given Table.Column.
 Table.Cell<E> resolveOrCreateCell(TableInternal.StripeData<E> stripeData, int indexPosition)
          Tries to resolve or create a Table.Cell for the given Table.Stripe instance and its orthogonal Table.Stripe and index position relation
 Table.Cell<E> resolveOrCreateCell(TableInternal.StripeData<E> stripeData, Object titleValue)
          Tries to resolve or create a Table.Cell for the given Table.Stripe instance and its orthogonal Table.Stripe with the given Table.Stripe.Title.getValue()
 Table.Cell<E> resolveOrCreateCell(TableInternal.StripeInternal<E> row, int columnIndexPosition)
          Tries to resolve a Table.Cell by the given Table.Row and Table.Column index position.
 Table.Cell<E> resolveOrCreateCell(TableInternal.StripeInternal<E> row, TableInternal.StripeInternal<E> column)
          Tries to resolve a Table.Cell by a given RowInternal and ColumnInternal.
 Table.Cell<E> resolveOrCreateCellWithinNewTableArea(int cellIndexPosition)
          Resolves or creates a Table.Cell even if it is out of the current Table area
 Table.Cell<E> resolveOrCreateCellWithinNewTableArea(int rowIndexPosition, int columnIndexPosition)
          Resolves or creates a Table.Cell even if it is out of the current Table area
 Table.Cell<E> resolveOrCreateCellWithinNewTableArea(int rowIndexPosition, TableInternal.StripeInternal<E> column)
          Resolves or creates a Table.Cell even if it is out of the current Table area
 Table.Cell<E> resolveOrCreateCellWithinNewTableArea(TableInternal.StripeData<E> stripeData, int indexPosition)
          Resolves or creates a Table.Cell even if it is out of the current Table area
 Table.Cell<E> resolveOrCreateCellWithinNewTableArea(TableInternal.StripeData<E> stripeData, Object titleValue)
          Resolves or creates a Table.Cell even if it is out of the current Table area
 Table.Cell<E> resolveOrCreateCellWithinNewTableArea(TableInternal.StripeInternal<E> row, int columnIndexPosition)
          Resolves or creates a Table.Cell even if it is out of the current Table area
 TableInternal.StripeData<E> resolveOrCreateColumnStripeData(int columnIndexPosition)
          Tries to resolve the Table.Column for the given Table.Column index position.
 TableInternal.StripeData<E> resolveOrCreateRowStripeData(int rowIndexPosition)
          Tries to resolve the Table.Row for the given Table.Row index position.
 TableInternal.StripeData<E> resolveRowStripeData(int rowIndexPosition)
          Resolves a RowInternal for the given Table.Row index position.
 TableInternal.StripeData<E> resolveRowStripeData(Object titleValue)
          Resolves the Table.Row by the given Table.Stripe.Title.getValue()
protected abstract  TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType, Object titleValue)
          Resolves the TableInternal.StripeData instance for the given Table.Stripe.StripeType and the Table.Stripe.Title.getValue()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omnaest.utils.structure.table.internal.TableInternal.CellAndStripeResolver
resolveCell, resolveCell, resolveCell, resolveOrCreateCell, resolveOrCreateStripeData, resolveOrCreateStripeData, resolveStripeData
 

Constructor Detail

CellAndStripeResolverAbstract

public CellAndStripeResolverAbstract()
Method Detail

determineRowIndexPositionForCellIndexPosition

protected abstract int determineRowIndexPositionForCellIndexPosition(int cellIndexPosition)
Parameters:
cellIndexPosition -
Returns:

determineColumnIndexPositionForCellIndexPosition

protected abstract int determineColumnIndexPositionForCellIndexPosition(int cellIndexPosition)
Parameters:
cellIndexPosition -
Returns:

resolveStripeData

protected abstract TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType,
                                                                 Object titleValue)
Resolves the TableInternal.StripeData instance for the given Table.Stripe.StripeType and the Table.Stripe.Title.getValue()

Parameters:
stripeType -
titleValue -
Returns:

resolveCell

public Table.Cell<E> resolveCell(TableInternal.StripeInternal<E> row,
                                 TableInternal.StripeInternal<E> column)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by a given Table.Row and Table.Column

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(TableInternal.StripeInternal<E> row,
                                         TableInternal.StripeInternal<E> column)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve a Table.Cell by a given RowInternal and ColumnInternal. If there is no Table.Cell available a new one is created.

Specified by:
resolveOrCreateCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(Object rowTitleValue,
                                 Object columnTitleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by the Table.Row title value and the Table.Column title value

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(int rowIndexPosition,
                                 Object columnTitleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by the Table.Row index position and the Table.Column title value

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(Object rowTitleValue,
                                 int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by the Table.Row title value and the Table.Column index position

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(int rowIndexPosition,
                                 int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves the Table.Cell for the given index positions.

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(TableInternal.StripeInternal<E> row,
                                 int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell for the given Table.Row and Table.Column index position.

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(TableInternal.StripeInternal<E> row,
                                 Object columnTitleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by the Table.Row and the Table.Stripe.Title.getValue() of the Table.Column

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(int rowIndexPosition,
                                 TableInternal.StripeInternal<E> column)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by a row index position and a Table.Column.

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(Object rowTitleValue,
                                 TableInternal.StripeInternal<E> column)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by the Table.Stripe.Title.getValue() of the Table.Row and the Table.Column

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(int rowIndexPosition,
                                         int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by its Table.Row and Table.Column index positions. If no Table.Cell can be resolved a new one is created.

Specified by:
resolveOrCreateCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCellWithinNewTableArea

public Table.Cell<E> resolveOrCreateCellWithinNewTableArea(int rowIndexPosition,
                                                           int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves or creates a Table.Cell even if it is out of the current Table area

Specified by:
resolveOrCreateCellWithinNewTableArea in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(int rowIndexPosition,
                                         TableInternal.StripeInternal<E> column)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve a Table.Cell by the given Table.Row index position and a given Table.Column. If no Table.Cell is available a new one will be created.

Specified by:
resolveOrCreateCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCellWithinNewTableArea

public Table.Cell<E> resolveOrCreateCellWithinNewTableArea(int rowIndexPosition,
                                                           TableInternal.StripeInternal<E> column)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves or creates a Table.Cell even if it is out of the current Table area

Specified by:
resolveOrCreateCellWithinNewTableArea in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(TableInternal.StripeInternal<E> row,
                                         int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve a Table.Cell by the given Table.Row and Table.Column index position. If no Table.Cell is available a new one will be created.

Specified by:
resolveOrCreateCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCellWithinNewTableArea

public Table.Cell<E> resolveOrCreateCellWithinNewTableArea(TableInternal.StripeInternal<E> row,
                                                           int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves or creates a Table.Cell even if it is out of the current Table area

Specified by:
resolveOrCreateCellWithinNewTableArea in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(TableInternal.StripeData<E> stripeData,
                                         int indexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve or create a Table.Cell for the given Table.Stripe instance and its orthogonal Table.Stripe and index position relation

Specified by:
resolveOrCreateCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCellWithinNewTableArea

public Table.Cell<E> resolveOrCreateCellWithinNewTableArea(TableInternal.StripeData<E> stripeData,
                                                           int indexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves or creates a Table.Cell even if it is out of the current Table area

Specified by:
resolveOrCreateCellWithinNewTableArea in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveCell

public Table.Cell<E> resolveCell(int cellIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by its Table.Cell index position. The Table.Cell index position is counted from left to right starting from top to bottom of the Table. First index position is 0. If the Table.Cell index position is out of boundary null is returned.

Specified by:
resolveCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(int cellIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by its Table.Cell index position or creates it if it cannot be resolved. The Table.Cell index position is counted from left to right starting from top to bottom of the Table. First index position is 0. If the Table.Cell index position is out of boundary null is returned.

Specified by:
resolveOrCreateCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCellWithinNewTableArea

public Table.Cell<E> resolveOrCreateCellWithinNewTableArea(int cellIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves or creates a Table.Cell even if it is out of the current Table area

Specified by:
resolveOrCreateCellWithinNewTableArea in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveRowStripeData

public TableInternal.StripeData<E> resolveRowStripeData(int rowIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a RowInternal for the given Table.Row index position.

Specified by:
resolveRowStripeData in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveColumnStripeData

public TableInternal.StripeData<E> resolveColumnStripeData(Object titleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves the Table.Column by the given Table.Stripe.Title.getValue()

Specified by:
resolveColumnStripeData in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveColumnStripeData

public TableInternal.StripeData<E> resolveColumnStripeData(int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a ColumnInternal for the given Table.Column index position.

Specified by:
resolveColumnStripeData in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveRowStripeData

public TableInternal.StripeData<E> resolveRowStripeData(Object titleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves the Table.Row by the given Table.Stripe.Title.getValue()

Specified by:
resolveRowStripeData in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(TableInternal.StripeData<E> stripeData,
                                         Object titleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve or create a Table.Cell for the given Table.Stripe instance and its orthogonal Table.Stripe with the given Table.Stripe.Title.getValue()

Specified by:
resolveOrCreateCell in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateCellWithinNewTableArea

public Table.Cell<E> resolveOrCreateCellWithinNewTableArea(TableInternal.StripeData<E> stripeData,
                                                           Object titleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves or creates a Table.Cell even if it is out of the current Table area

Specified by:
resolveOrCreateCellWithinNewTableArea in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateColumnStripeData

public TableInternal.StripeData<E> resolveOrCreateColumnStripeData(int columnIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve the Table.Column for the given Table.Column index position. If the Table.Column does not exists but would have a valid Table.Column index position it will be created.

Specified by:
resolveOrCreateColumnStripeData in interface TableInternal.CellAndStripeResolver<E>
Returns:

resolveOrCreateRowStripeData

public TableInternal.StripeData<E> resolveOrCreateRowStripeData(int rowIndexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve the Table.Row for the given Table.Row index position. If the Table.Row does not exists but would have a valid Table.Row index position it will be created.

Specified by:
resolveOrCreateRowStripeData in interface TableInternal.CellAndStripeResolver<E>
Returns:


Copyright © 2011. All Rights Reserved.