Interface Container.Indexed

Interface for Container classes whose Items can be indexed.

Synopsis

Inheritance Path.  com.itmill.toolkit.data.Container.Indexed

addItemAt(int)

Parameters

index

Index to add the new item.

return

Returns item id the the created new item or null if the operation fails.

Add new item at given index.

The indexes of the item currently in the given position and all the following items are incremented.

addItemAt(int, Object)

Parameters

index

Index to add the new item.

newItemId

Id of the new item to be added.

return

Returns new item or null if the operation fails.

Add new item at given index.

The indexes of the item currently in the given position and all the following items are incremented.

getIdByIndex(int)

Parameters

index

Index of the requested id in the Container

return

ID of the Item in the given index

Get the ID of an Item by an index number. The following is true for the index: 0 <= index < size().

indexOfId(Object)

Parameters

itemId

ID of an Item in the Container

return

index of the Item, or -1 if the Container does not include the Item

Gets the index of the Item corresponding to itemId . The following is true for the returned index: 0 <= index < size().