A specialized set of identified Items. Basically the Container is a set of {@link Item}s, but it imposes certain constraints on its contents. These constraints state the following:
- All Items in the Container must have the same number of Properties.
- All Items in the Container must have the same Property ID's (see {@link Item#getItemPropertyIds()}).
- All Properties in the Items corresponding to the same Property ID must have the same data type.
- All Items within a container are uniquely identified by their non-null IDs.
The Container can be visualized as a representation of a relational database table. Each Item in the Container represents a row in the table, and all cells in a column (identified by a Property ID) have the same data type. Note that as with the cells in a database table, no Property in a Container may be empty, though they may contain null
values.
Note that though uniquely identified, the Items in a Container are not necessarily {@link Container.Ordered ordered} or {@link Container.Indexed indexed}.
Containers can derive Item ID's from the item properties or use other, container specific or user specified identifiers.
If a container is {@link Filterable filtered} or {@link Sortable sorted}, most of the the methods of the container interface and its subinterfaces (container size, {@link #containsId(Object)}, iteration and indices etc.) relate to the filtered and sorted view, not to the full container contents. See individual method javadoc for exceptions to this (adding and removing items).
The Container interface is split to several subinterfaces so that a class can implement only the ones it needs.
@author Vaadin Ltd
@since 3.0