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

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.internal.StripeDataListImpl<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, Iterable<TableInternal.StripeData<E>>, TableInternal.StripeDataList<E>, TableInternal.TableComponentInternal, Table.TableComponent

public class StripeDataListImpl<E>
extends Object
implements TableInternal.StripeDataList<E>

Author:
Omnaest
See Also:
TableInternal.StripeDataList, Table.Stripe, Serialized Form

Field Summary
protected  Map<TableInternal.CellData<E>,Set<TableInternal.StripeData<E>>> cellDataToStripeDataSetMap
           
protected  List<TableInternal.StripeData<E>> stripeDataList
           
protected  Table.Stripe.StripeType stripeType
           
 
Constructor Summary
StripeDataListImpl(Table.Stripe.StripeType stripeType)
           
 
Method Summary
 void addAllStripeData(Iterable<TableInternal.StripeData<E>> stripeDataIterable)
           
 TableInternal.StripeData<E> addNewStripeData()
          Adds a new created Table.Stripe instance to the StripeDataListImpl.
 TableInternal.StripeData<E> addNewStripeData(int indexPosition)
          Adds a new created TableInternal.StripeData instance into the given index position of the TableInternal.StripeDataList.
 void addStripeData(TableInternal.StripeData<E> stripeData)
          Adds a TableInternal.StripeData instance to the current TableInternal.StripeDataList
 void clear()
          Clears the TableInternal.StripeDataList.
 boolean contains(Object titleValue)
          Returns true if the TableInternal.StripeDataList contains a Table.Stripe with the given Table.Stripe.Title.getValue()
 boolean contains(TableInternal.StripeData<E> stripeData)
          Returns true if the TableInternal.StripeDataList contains the given TableInternal.StripeData
 List<TableInternal.StripeData<E>> findStripeDataListContaining(TableInternal.CellData<E> cellData)
          Returns the List of TableInternal.StripeData which contains the given Table.Cell
 TableInternal.StripeData<E> getStripeData(int index)
          Returns the stripe at the given index position.
 TableInternal.StripeData<E> getStripeData(Object titleValue)
          Returns the TableInternal.StripeData with the given Table.Stripe.Title.getValue().
 Set<TableInternal.StripeData<E>> getStripeDataSet(TableInternal.CellData<E> cellData)
          Returns the Set of TableInternal.StripeData instances which all hold a reference to the given TableInternal.CellData
 Table.Stripe.StripeType getStripeType()
          Returns the Table.Stripe.StripeType information of the TableInternal.StripeDataList
 int indexOf(TableInternal.StripeData<E> stripeData)
          Returns the index of a given Table.Stripe
 boolean isEmpty()
          Returns true if the TableInternal.StripeDataList does not contain any Table.Stripe instance.
 Iterator<TableInternal.StripeData<E>> iterator()
           
 void registerStripeDataForCellDatas(Collection<TableInternal.CellData<E>> cellDataCollection, TableInternal.StripeData<E> stripeData)
          Registers a TableInternal.StripeData instance for the given TableInternal.CellData instances
 TableInternal.StripeData<E> removeStripeData(int indexPosition)
          Removes a TableInternal.StripeData from the TableInternal.StripeDataList without detaching its TableInternal.CellData from the orthogonal TableInternal.StripeData instances.
 void removeStripeData(TableInternal.StripeData<E> stripeData)
          Removes a TableInternal.StripeData from the TableInternal.StripeDataList without detaching its TableInternal.CellData instances from the orthogonal TableInternal.StripeData instances
 void setStripeType(Table.Stripe.StripeType stripeType)
          Sets the Table.Stripe.StripeType information of the TableInternal.StripeDataList
 int size()
          Returns the size of the TableInternal.StripeDataList
 void unregisterCells(Iterable<TableInternal.CellData<E>> cellDataIterable)
          Unregisters the given TableInternal.CellData instances from all TableInternal.StripeData contained within this TableInternal.StripeDataList
 void unregisterStripeDataForCellDatas(Collection<TableInternal.CellData<E>> cellDataCollection, TableInternal.StripeData<E> stripeData)
          Unregisters the given Collection of TableInternal.CellData instances for the TableInternal.StripeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stripeDataList

protected List<TableInternal.StripeData<E>> stripeDataList

stripeType

protected Table.Stripe.StripeType stripeType

cellDataToStripeDataSetMap

protected Map<TableInternal.CellData<E>,Set<TableInternal.StripeData<E>>> cellDataToStripeDataSetMap
Constructor Detail

StripeDataListImpl

public StripeDataListImpl(Table.Stripe.StripeType stripeType)
Parameters:
stripeType -
Method Detail

addNewStripeData

public TableInternal.StripeData<E> addNewStripeData()
Adds a new created Table.Stripe instance to the StripeDataListImpl.

Specified by:
addNewStripeData in interface TableInternal.StripeDataList<E>
Returns:

addNewStripeData

public TableInternal.StripeData<E> addNewStripeData(int indexPosition)
Description copied from interface: TableInternal.StripeDataList
Adds a new created TableInternal.StripeData instance into the given index position of the TableInternal.StripeDataList. This moves an already existing Table.Stripe at that position and all following Table.Stripe instances one position further.

Specified by:
addNewStripeData in interface TableInternal.StripeDataList<E>
Returns:

size

public int size()
Description copied from interface: TableInternal.StripeDataList
Returns the size of the TableInternal.StripeDataList

Specified by:
size in interface TableInternal.StripeDataList<E>
Returns:

isEmpty

public boolean isEmpty()
Description copied from interface: TableInternal.StripeDataList
Returns true if the TableInternal.StripeDataList does not contain any Table.Stripe instance.

Specified by:
isEmpty in interface TableInternal.StripeDataList<E>
Returns:

clear

public void clear()
Description copied from interface: TableInternal.StripeDataList
Clears the TableInternal.StripeDataList.

Specified by:
clear in interface TableInternal.StripeDataList<E>

indexOf

public int indexOf(TableInternal.StripeData<E> stripeData)
Description copied from interface: TableInternal.StripeDataList
Returns the index of a given Table.Stripe

Specified by:
indexOf in interface TableInternal.StripeDataList<E>
Returns:

getStripeType

public Table.Stripe.StripeType getStripeType()
Description copied from interface: TableInternal.StripeDataList
Returns the Table.Stripe.StripeType information of the TableInternal.StripeDataList

Specified by:
getStripeType in interface TableInternal.StripeDataList<E>
Returns:

setStripeType

public void setStripeType(Table.Stripe.StripeType stripeType)
Description copied from interface: TableInternal.StripeDataList
Sets the Table.Stripe.StripeType information of the TableInternal.StripeDataList

Specified by:
setStripeType in interface TableInternal.StripeDataList<E>

getStripeData

public TableInternal.StripeData<E> getStripeData(int index)
Description copied from interface: TableInternal.StripeDataList
Returns the stripe at the given index position. If the index position is out of bounds null is returned.

Specified by:
getStripeData in interface TableInternal.StripeDataList<E>
Returns:

iterator

public Iterator<TableInternal.StripeData<E>> iterator()
Specified by:
iterator in interface Iterable<TableInternal.StripeData<E>>

findStripeDataListContaining

public List<TableInternal.StripeData<E>> findStripeDataListContaining(TableInternal.CellData<E> cellData)
Description copied from interface: TableInternal.StripeDataList
Returns the List of TableInternal.StripeData which contains the given Table.Cell

Specified by:
findStripeDataListContaining in interface TableInternal.StripeDataList<E>
Returns:

contains

public boolean contains(TableInternal.StripeData<E> stripeData)
Description copied from interface: TableInternal.StripeDataList
Returns true if the TableInternal.StripeDataList contains the given TableInternal.StripeData

Specified by:
contains in interface TableInternal.StripeDataList<E>
Returns:

contains

public boolean contains(Object titleValue)
Description copied from interface: TableInternal.StripeDataList
Returns true if the TableInternal.StripeDataList contains a Table.Stripe with the given Table.Stripe.Title.getValue()

Specified by:
contains in interface TableInternal.StripeDataList<E>
Returns:

getStripeDataSet

public Set<TableInternal.StripeData<E>> getStripeDataSet(TableInternal.CellData<E> cellData)
Returns the Set of TableInternal.StripeData instances which all hold a reference to the given TableInternal.CellData

Parameters:
cellData -
Returns:

getStripeData

public TableInternal.StripeData<E> getStripeData(Object titleValue)
Description copied from interface: TableInternal.StripeDataList
Returns the TableInternal.StripeData with the given Table.Stripe.Title.getValue(). If no Table.Stripe has the given Table.Stripe.Title null is returned.

Specified by:
getStripeData in interface TableInternal.StripeDataList<E>
Returns:

removeStripeData

public void removeStripeData(TableInternal.StripeData<E> stripeData)
Description copied from interface: TableInternal.StripeDataList
Removes a TableInternal.StripeData from the TableInternal.StripeDataList without detaching its TableInternal.CellData instances from the orthogonal TableInternal.StripeData instances

Specified by:
removeStripeData in interface TableInternal.StripeDataList<E>

removeStripeData

public TableInternal.StripeData<E> removeStripeData(int indexPosition)
Description copied from interface: TableInternal.StripeDataList
Removes a TableInternal.StripeData from the TableInternal.StripeDataList without detaching its TableInternal.CellData from the orthogonal TableInternal.StripeData instances.

Specified by:
removeStripeData in interface TableInternal.StripeDataList<E>
Returns:
the removed TableInternal.StripeData instance

addStripeData

public void addStripeData(TableInternal.StripeData<E> stripeData)
Description copied from interface: TableInternal.StripeDataList
Adds a TableInternal.StripeData instance to the current TableInternal.StripeDataList

Specified by:
addStripeData in interface TableInternal.StripeDataList<E>
See Also:
#addAllStripeData(Collection)

registerStripeDataForCellDatas

public void registerStripeDataForCellDatas(Collection<TableInternal.CellData<E>> cellDataCollection,
                                           TableInternal.StripeData<E> stripeData)
Description copied from interface: TableInternal.StripeDataList
Registers a TableInternal.StripeData instance for the given TableInternal.CellData instances

Specified by:
registerStripeDataForCellDatas in interface TableInternal.StripeDataList<E>

unregisterStripeDataForCellDatas

public void unregisterStripeDataForCellDatas(Collection<TableInternal.CellData<E>> cellDataCollection,
                                             TableInternal.StripeData<E> stripeData)
Description copied from interface: TableInternal.StripeDataList
Unregisters the given Collection of TableInternal.CellData instances for the TableInternal.StripeData

Specified by:
unregisterStripeDataForCellDatas in interface TableInternal.StripeDataList<E>

unregisterCells

public void unregisterCells(Iterable<TableInternal.CellData<E>> cellDataIterable)
Description copied from interface: TableInternal.StripeDataList
Unregisters the given TableInternal.CellData instances from all TableInternal.StripeData contained within this TableInternal.StripeDataList

Specified by:
unregisterCells in interface TableInternal.StripeDataList<E>

addAllStripeData

public void addAllStripeData(Iterable<TableInternal.StripeData<E>> stripeDataIterable)
Specified by:
addAllStripeData in interface TableInternal.StripeDataList<E>
See Also:
#addStripeData(StripeData)


Copyright © 2011. All Rights Reserved.