| java.lang.Object org.millstone.base.data.util.IndexedContainer
All known Subclasses: org.millstone.base.data.util.HierarchicalContainer,
Inner Class :class IndexedContainerItem implements Item | |
IndexedContainer | public IndexedContainer()(Code) | | |
addContainerProperty | public boolean addContainerProperty(Object propertyId, Class type, Object defaultValue)(Code) | | Add a new Property to all Items in the list. The Property ID, data type
and default value of the new Property are given as parameters.
Parameters: propertyId - ID of the new Property Parameters: type - Data type of the new Property Parameters: defaultValue - The value all created Properties are initialized to true if the operation succeeded,false if not |
addItem | public Object addItem()(Code) | | Create a new Item into the list, and assign it an automatic ID. The new
ID is returned, or null if the operation fails. After a
successful call you can use the
IndexedContainer.getItem(Object ItemId) getItem method to fetch the
Item.
ID of the newly created Item, or null in case of afailure |
addItem | public Item addItem(Object itemId)(Code) | | Create a new Item with the given ID into the list. The new Item is
returned, and it is ready to have its Properties modified. Returns
null if the operation fails or the Container already
contains a Item with the given ID.
Parameters: itemId - ID of the Item to be created Created new Item, or null in case of a failure |
addItemAfter | public Item addItemAfter(Object previousItemId, Object newItemId)(Code) | | See Also: org.millstone.base.data.Container.Ordered.addItemAfter(ObjectObject) |
addItemAfter | public Object addItemAfter(Object previousItemId)(Code) | | See Also: org.millstone.base.data.Container.Ordered.addItemAfter(Object) |
addItemAt | public Item addItemAt(int index, Object newItemId)(Code) | | See Also: org.millstone.base.data.Container.Indexed.addItemAt(intObject) |
addItemAt | public Object addItemAt(int index)(Code) | | See Also: org.millstone.base.data.Container.Indexed.addItemAt(int) |
addListener | public void addListener(Property.ValueChangeListener listener)(Code) | | Registers a new value change listener for this object.
Parameters: listener - the new Listener to be registered |
containsId | public boolean containsId(Object itemId)(Code) | | Tests if the list contains the specified Item
Parameters: itemId - ID the of Item to be tested for true if the operation succeeded,false if not |
firstItemId | public Object firstItemId()(Code) | | Gets the ID of the first Item in the list.
ID of the first Item in the list |
getContainerProperty | public Property getContainerProperty(Object itemId, Object propertyId)(Code) | | Gets the Property identified by the given Item ID and Property ID from
the lsit. If the list does not contain the Property, null
is returned.
Parameters: itemId - ID of the Item which contains the requested Property Parameters: propertyId - ID of the Property to retrieve Property with the given ID or null See Also: org.millstone.base.data.Container.getContainerProperty(ObjectObject) |
getContainerPropertyIds | public Collection getContainerPropertyIds()(Code) | | Gets the ID's of all Properties stored in the list. The ID's are returned
as a unmodifiable collection.
unmodifiable collection of Property IDs |
getIdByIndex | public Object getIdByIndex(int index)(Code) | | Get ID with the index. The following is true for the index: 0 <= index <
size().
ID in the given index. Parameters: index - Index of the requested ID in the container. |
getItem | public Item getItem(Object itemId)(Code) | | Gets the Item with the given Item ID from the list. If the list does not
contain the requested Item, null is returned.
Parameters: itemId - ID of the Item to retrieve the Item with the given ID or null if the Item isnot found in the list |
getItemIds | public Collection getItemIds()(Code) | | Gets the ID's of all Items stored in the list. The ID's are returned as a
unmodifiable collection.
unmodifiable collection of Item IDs |
getSortableContainerPropertyIds | public Collection getSortableContainerPropertyIds()(Code) | | |
getType | public Class getType(Object propertyId)(Code) | | Gets the type of a Property stored in the list.
Parameters: id - ID of the Property Type of the requested Property |
hashCode | public int hashCode()(Code) | | |
indexOfId | public int indexOfId(Object itemId)(Code) | | Get the index of an id. The following is true for the index: 0 <= index <
size().
Index of the Item or -1 if the Item is not in the container. Parameters: itemId - ID of an Item in the collection |
isFirstId | public boolean isFirstId(Object itemId)(Code) | | Tests if the Item corresponding to the given Item ID is the first Item in
the list.
Parameters: itemId - ID of an Item in the list true if the Item is first in the list,false if not |
isLastId | public boolean isLastId(Object itemId)(Code) | | Tests if the Item corresponding to the given Item ID is the last Item in
the list.
Parameters: itemId - ID of an Item in the list true if the Item is last in the list,false if not |
lastItemId | public Object lastItemId()(Code) | | Gets the ID of the last Item in the list.
ID of the last Item in the list |
nextItemId | public Object nextItemId(Object itemId)(Code) | | Gets the ID of the Item following the Item that corresponds to
itemId . If the given Item is the last or not found in the
list, null is returned.
Parameters: itemId - ID of an Item in the list ID of the next Item or null |
prevItemId | public Object prevItemId(Object itemId)(Code) | | Gets the ID of the Item preceding the Item that corresponds to
itemId . If the given Item is the first or not found in
the list, null is returned.
Parameters: itemId - ID of an Item in the list ID of the previous Item or null |
removeAllItems | public boolean removeAllItems()(Code) | | Remove all Items from the list. Note that Property ID and type
information is preserved.
true if the operation succeeded,false if not |
removeContainerProperty | public boolean removeContainerProperty(Object propertyId)(Code) | | Remove a Property specified by the given Property ID from the list. Note
that the Property will be removed from all Items in the list.
Parameters: propertyId - ID of the Property to remove true if the operation succeeded,false if not |
removeItem | public boolean removeItem(Object itemId)(Code) | | Remove the Item corresponding to the given Item ID from the list.
Parameters: itemId - ID of the Item to remove true if the operation succeeded,false if not |
removeListener | public void removeListener(Container.ItemSetChangeListener listener)(Code) | | Removes a Item set change listener from the object.
Parameters: listener - listener to be removed |
removeListener | public void removeListener(Property.ValueChangeListener listener)(Code) | | Removes a previously registered value change listener.
Parameters: listener - listener to be removed |
size | public int size()(Code) | | Gets the number of Items in the list.
number of Items in the list |
sort | public synchronized void sort(Object[] propertyId, boolean[] ascending)(Code) | | |
|
|