* Gets the {@link Item} with the given Item ID from the Container. If the
* Container does not contain the requested Item, <code>null</code> is
* returned.
- *
+ * <p>
* Containers should not return Items that are filtered out.
*
* @param itemId
* Gets the ID's of all visible (after filtering and sorting) Items stored
* in the Container. The ID's cannot be modified through the returned
* collection.
- *
+ * <p>
* If the container is {@link Ordered}, the collection returned by this
* method should follow that order. If the container is {@link Sortable},
* the items should be in the sorted order.
- *
+ * <p>
* Calling this method for large lazy containers can be an expensive
* operation and should be avoided when practical.
*
/**
* Gets the number of visible Items in the Container.
- *
+ * <p>
* Filtering can hide items so that they will not be visible through the
* container API.
*
/**
* Tests if the Container contains the specified Item.
- *
+ * <p>
* Filtering can hide items so that they will not be visible through the
* container API, and this method should respect visibility of items (i.e.
* only indicate visible items as being in the container) if feasible for
/**
* Adds a new Property to all Items in the Container. The Property ID, data
* type and default value of the new Property are given as parameters.
- *
+ * <p>
* This functionality is optional.
*
* @param propertyId
/**
* Removes a Property specified by the given Property ID from the Container.
* Note that the Property will be removed from all Items in the Container.
- *
+ * <p>
* This functionality is optional.
*
* @param propertyId
public interface Sortable extends Ordered {
/**
- * Sort method.
- *
* Sorts the container items.
- *
+ * <p>
* Sorting a container can irreversibly change the order of its items or
* only change the order temporarily, depending on the container.
*
/**
* Get the item id for the item at the position given by
- * <code>index</code>. <br>
- * <br>
- * <b>Throws:</b> {@link IndexOutOfBoundsException} if
- * <code>index</code> is outside the range of the container. (i.e.
- * <code>index < 0 || container.size()-1 < index</code>)
+ * <code>index</code>.
+ * <p>
*
* @param index
* the index of the requested item id
* @return the item id of the item at the given index
+ * @throws IndexOutOfBoundsException
+ * if <code>index</code> is outside the range of the
+ * container. (i.e.
+ * <code>index < 0 || container.size()-1 < index</code>
+ * )
*/
public Object getIdByIndex(int index);
/**
* Get <code>numberOfItems</code> consecutive item ids from the
- * container, starting with the item id at <code>startIndex</code>. <br>
- * <br>
- *
+ * container, starting with the item id at <code>startIndex</code>.
+ * <p>
* Implementations should return at most <code>numberOfItems</code> item
* ids, but can contain less if the container has less items than
* required to fulfill the request. The returned list must hence contain
- * all of the item ids from the range: <br>
- * <br>
+ * all of the item ids from the range:
+ * <p>
* <code>startIndex</code> to
- * <code>max(startIndex + (numberOfItems-1), container.size()-1)</code>. <br>
- * <br>
+ * <code>max(startIndex + (numberOfItems-1), container.size()-1)</code>.
+ * <p>
* For quick migration to new API see:
* {@link ContainerHelpers#getItemIdsUsingGetIdByIndex(int, int, Indexed)}
- * . <br>
- * <br>
- * <b>Throws:</b> {@link IllegalArgumentException} if
- * <code>numberOfItems</code> is < 0 <br>
- * <b>Throws:</b> {@link IndexOutOfBoundsException} if
- * <code>startIndex</code> is outside the range of the container. (i.e.
- * <code>startIndex < 0 || container.size()-1 < startIndex</code>)
*
* @param startIndex
* the index for the first item which id to include
* @return List containing the requested item ids or empty list if
* <code>numberOfItems</code> == 0; not null
*
+ * @throws IllegalArgumentException
+ * if <code>numberOfItems</code> is < 0
+ * @throws IndexOutOfBoundsException
+ * if <code>startIndex</code> is outside the range of the
+ * container. (i.e.
+ * <code>startIndex < 0 || container.size()-1 < startIndex</code>
+ * )
+ *
* @since 7.0
*/
public List<?> getItemIds(int startIndex, int numberOfItems);
* Note that being a leaf does not imply whether or not an Item is
* allowed to have children.
* </p>
- * .
*
* @param itemId
* ID of the Item to be tested
/**
* Add a filter for given property.
- *
+ * <p>
* The API {@link Filterable#addContainerFilter(Filter)} is recommended
* instead of this method. A {@link SimpleStringFilter} can be used with
* the new API to implement the old string filtering functionality.
- *
+ * <p>
* The filter accepts items for which toString() of the value of the
* given property contains or starts with given filterString. Other
* items are not visible in the container when filtered.
- *
+ * <p>
* If a container has multiple filters, only items accepted by all
* filters are visible.
*
/**
* Filter interface for container filtering.
- *
+ * <p>
* If a filter does not support in-memory filtering,
* {@link #passesFilter(Item)} should throw
* {@link UnsupportedOperationException}.
- *
+ * <p>
* Lazy containers must be able to map filters to their internal
* representation (e.g. SQL or JPA 2.0 Criteria).
- *
+ * <p>
* An {@link UnsupportedFilterException} can be thrown by the container if a
* particular filter is not supported by the container.
- *
+ * <p>
* An {@link Filter} should implement {@link #equals(Object)} and
* {@link #hashCode()} correctly to avoid duplicate filter registrations
* etc.
public interface Filterable extends Container, Serializable {
/**
* Adds a filter for the container.
- *
+ * <p>
* If a container has multiple filters, only items accepted by all
* filters are visible.
*
/**
* Removes a filter from the container.
- *
+ * <p>
* This requires that the equals() method considers the filters as
* equivalent (same instance or properly implemented equals() method).
*/
/**
* Container Item set change listener interface.
- *
+ * <p>
* An item set change refers to addition, removal or reordering of items in
* the container. A simple property value change is not an item set change.
*/
* listeners. By implementing this interface a class explicitly announces
* that it will generate a <code>ItemSetChangeEvent</code> when its contents
* are modified.
- *
+ * <p>
* An item set change refers to addition, removal or reordering of items in
* the container. A simple property value change is not an item set change.
*
/**
* An <code>Event</code> object specifying the Container whose Property set
* has changed.
- *
+ * <p>
* A property set change means the addition, removal or other structural
* changes to the properties of a container. Changes concerning the set of
* items in the container and their property values are not property set
/**
* The listener interface for receiving <code>PropertySetChangeEvent</code>
* objects.
- *
+ * <p>
* A property set change means the addition, removal or other structural
* change of the properties (supported property IDs) of a container. Changes
* concerning the set of items in the container and their property values