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

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.internal.CellImpl<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, TableInternal.CellInternal<E>, TableInternal.TableComponentInternal, Table.Cell<E>, Table.CellImmutable<E>, Table.TableComponent

public class CellImpl<E>
extends Object
implements TableInternal.CellInternal<E>

Wrapper for a CellDataImpl instance which additionally holds references to the TableInternal.StripeData instances which led to the underlying CellDataImpl

Author:
Omnaest
See Also:
Table.Cell, TableInternal.CellInternal, CellDataImpl, Serialized Form

Field Summary
protected  TableInternal.CellData<E> cellData
           
protected  List<TableInternal.StripeData<E>> stripeDataList
           
 
Constructor Summary
protected CellImpl(Collection<TableInternal.StripeData<E>> stripeDataCollection, TableInternal.CellData<E> cellData)
           
 
Method Summary
 Table.Cell<E> detachFromTable()
          Removes a Table.Cell from its related Table.Row and Table.Column.
 boolean equals(Object obj)
           
 TableInternal.CellData<E> getCellData()
          Returns the underlying TableInternal.CellData instance
 E getElement()
          Returns the value of the Table.Cell
 boolean hasElement(E element)
          Returns true if the given element equals the current Table.CellImmutable.getElement()
 int hashCode()
           
protected  TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType)
           
 void setElement(E element)
          Sets the value of the Table.Cell
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stripeDataList

protected List<TableInternal.StripeData<E>> stripeDataList

cellData

protected TableInternal.CellData<E> cellData
Constructor Detail

CellImpl

protected CellImpl(Collection<TableInternal.StripeData<E>> stripeDataCollection,
                   TableInternal.CellData<E> cellData)
Parameters:
stripeDataCollection -
Method Detail

detachFromTable

public Table.Cell<E> detachFromTable()
Description copied from interface: TableInternal.CellInternal
Removes a Table.Cell from its related Table.Row and Table.Column.

Specified by:
detachFromTable in interface TableInternal.CellInternal<E>
Returns:

resolveStripeData

protected TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType)

getElement

public E getElement()
Description copied from interface: Table.CellImmutable
Returns the value of the Table.Cell

Specified by:
getElement in interface Table.CellImmutable<E>
Returns:

setElement

public void setElement(E element)
Description copied from interface: Table.Cell
Sets the value of the Table.Cell

Specified by:
setElement in interface Table.Cell<E>

hasElement

public boolean hasElement(E element)
Description copied from interface: Table.CellImmutable
Returns true if the given element equals the current Table.CellImmutable.getElement()

Specified by:
hasElement in interface Table.CellImmutable<E>
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

getCellData

public TableInternal.CellData<E> getCellData()
Description copied from interface: TableInternal.CellInternal
Returns the underlying TableInternal.CellData instance

Specified by:
getCellData in interface TableInternal.CellInternal<E>
Returns:


Copyright © 2011. All Rights Reserved.