|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omnaest.utils.structure.collection.CollectionAbstract<E>
org.omnaest.utils.structure.collection.list.ListAbstract<B>
org.omnaest.utils.structure.table.adapter.TableToTypeListAdapter<B>
B - Java Bean typepublic class TableToTypeListAdapter<B>
A TableToTypeListAdapter treats the horizontal Table.Rows of the Table as Java Beans. The Table.Column
titles of the Table have to be equal to (all or a subset) of the property names of the given Table, since the
property values of the Java Bean object will be written to the Table.Column with the respective title.
TableAdapter,
newInstance(Table, Class),
Serialized Form| Field Summary | |
|---|---|
protected Class<B> |
beanClass
|
protected Table<Object> |
table
|
| Constructor Summary | |
|---|---|
|
TableToTypeListAdapter(Class<? extends B> beanClass)
Creates a new TableAdapter for use with TableAdaptable.TableAdapterProvider.adapter(TableAdapter) only. |
protected |
TableToTypeListAdapter(Table<? extends Object> table,
Class<? extends B> beanClass)
Creates a new TableToTypeListAdapter with the given Table as underlying Table object. |
| Method Summary | ||
|---|---|---|
boolean |
add(B e)
|
|
void |
add(int index,
B element)
|
|
B |
addRow(int rowIndexPosition,
B bean)
Adds a new Table.Row to the underlying Table based on the values of the given Java Bean at the given row index
position. |
|
void |
clear()
|
|
B |
get(int rowIndexPosition)
Returns the Table.Row for the given row index position as Java Bean. |
|
Table<Object> |
getTable()
Returns the underlying Table data structure. |
|
int |
indexOf(Object o)
|
|
List<B> |
initializeAdapter(Table<Object> table)
Returns an adapter for the given Table |
|
int |
lastIndexOf(Object o)
|
|
static
|
newInstance(Table<?> table,
Class<? extends B> beanClass)
Factory methods which creates a new TableToTypeListAdapter instance for the given Java Bean Class and
Table . |
|
B |
remove(int index)
|
|
B |
set(int rowIndexPosition,
B bean)
Sets the Table.Row of the underling Table to the values of the given Java Bean. |
|
int |
size()
|
|
| Methods inherited from class org.omnaest.utils.structure.collection.list.ListAbstract |
|---|
addAll, contains, isValidIndex, iterator, listIterator, listIterator, remove, subList |
| Methods inherited from class org.omnaest.utils.structure.collection.CollectionAbstract |
|---|
addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
protected Table<Object> table
protected Class<B> beanClass
| Constructor Detail |
|---|
protected TableToTypeListAdapter(Table<? extends Object> table,
Class<? extends B> beanClass)
TableToTypeListAdapter with the given Table as underlying Table object.
table - beanClass - newInstance(Table, Class)public TableToTypeListAdapter(Class<? extends B> beanClass)
TableAdapter for use with TableAdaptable.TableAdapterProvider.adapter(TableAdapter) only. For normal usage see
newInstance(Table, Class) instead.
table - beanClass - newInstance(Table, Class),
initializeAdapter(Table),
newInstance(Table, Class)| Method Detail |
|---|
public static <B> TableToTypeListAdapter<B> newInstance(Table<?> table,
Class<? extends B> beanClass)
TableToTypeListAdapter instance for the given Java Bean Class and
Table .
B - table - beanClass -
public Table<Object> getTable()
Table data structure.
public int size()
size in interface Collection<B>size in interface List<B>public boolean add(B e)
add in interface Collection<B>add in interface List<B>
public B addRow(int rowIndexPosition,
B bean)
Table.Row to the underlying Table based on the values of the given Java Bean at the given row index
position.
rowIndexPosition - bean -
Table.Row immediately and vice versa.public void clear()
clear in interface Collection<B>clear in interface List<B>clear in class CollectionAbstract<B>public B get(int rowIndexPosition)
Table.Row for the given row index position as Java Bean. All changes to this Java Bean will be reflected within
the Table.Row of the Table
get in interface List<B>rowIndexPosition -
public B set(int rowIndexPosition,
B bean)
Table.Row of the underling Table to the values of the given Java Bean.
set in interface List<B>rowIndexPosition - bean -
Table.Row. This means changes
to this instance will be reflected immediately to the Table.Row and vice versa.
public void add(int index,
B element)
add in interface List<B>public B remove(int index)
remove in interface List<B>public int indexOf(Object o)
indexOf in interface List<B>public int lastIndexOf(Object o)
lastIndexOf in interface List<B>public List<B> initializeAdapter(Table<Object> table)
TableAdapterTable
initializeAdapter in interface TableAdapter<List<B>,Object>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||