com.ibm.mm.sdk.common
Interface dkCollection
-
- All Known Implementing Classes:
- DKChildCollection, DKFolder, DKLinkCollection, DKParts, dkQueryableCollection, DKResults, DKSequentialCollection
public interface dkCollectionInterface for CM8 collection operations.This interface defines the contract for managing collections of objects in the CM8 API. Collections provide ordered storage and manipulation of elements, supporting operations such as adding, removing, replacing, and retrieving elements at specific positions.
Collections can be associated with data objects and may have named attributes. Implementations typically provide sequential or indexed access to elements.
- See Also:
DKSequentialCollection,dkIterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddAllElements(dkCollection elements)Adds all elements from another collection to this collection.voidaddElement(java.lang.Object element)Adds an element to the collection.java.lang.StringgetAssociatedAttrName()Returns the name of the attribute associated with this collection.java.lang.StringgetName()Returns the name of this collection.dkDataObjectBasegetOwner()Returns the data object that owns this collection.voidinsertElementAt(java.lang.Object element, dkIterator where)Inserts an element at the position specified by the iterator.voidremoveAllElements()Removes all elements from the collection.voidremoveElementAt(dkIterator where)Removes the element at the position specified by the iterator.voidreplaceElementAt(java.lang.Object element, dkIterator where)Replaces the element at the position specified by the iterator with a new element.java.lang.ObjectretrieveElementAt(dkIterator where)Retrieves the element at the position specified by the iterator.
-
-
-
Method Detail
-
addElement
void addElement(java.lang.Object element) throws DKUsageErrorAdds an element to the collection.- Parameters:
element- the element to add to the collection- Throws:
DKUsageError- if the element is null or cannot be added
-
addAllElements
void addAllElements(dkCollection elements) throws DKUsageError
Adds all elements from another collection to this collection.- Parameters:
elements- the collection whose elements are to be added- Throws:
DKUsageError- if the elements collection is null or elements cannot be added
-
insertElementAt
void insertElementAt(java.lang.Object element, dkIterator where) throws DKUsageErrorInserts an element at the position specified by the iterator.- Parameters:
element- the element to insertwhere- the iterator position where the element should be inserted- Throws:
DKUsageError- if the element is null, the iterator is invalid, or insertion fails
-
removeElementAt
void removeElementAt(dkIterator where) throws DKUsageError
Removes the element at the position specified by the iterator.- Parameters:
where- the iterator position of the element to remove- Throws:
DKUsageError- if the iterator is invalid or removal fails
-
replaceElementAt
void replaceElementAt(java.lang.Object element, dkIterator where) throws DKUsageErrorReplaces the element at the position specified by the iterator with a new element.- Parameters:
element- the new element to replace the existing onewhere- the iterator position of the element to replace- Throws:
DKUsageError- if the element is null, the iterator is invalid, or replacement fails
-
retrieveElementAt
java.lang.Object retrieveElementAt(dkIterator where) throws DKUsageError
Retrieves the element at the position specified by the iterator.- Parameters:
where- the iterator position of the element to retrieve- Returns:
- the element at the specified position
- Throws:
DKUsageError- if the iterator is invalid or retrieval fails
-
removeAllElements
void removeAllElements() throws DKUsageErrorRemoves all elements from the collection.- Throws:
DKUsageError- if the removal operation fails
-
getName
java.lang.String getName()
Returns the name of this collection.- Returns:
- the collection name, or null if not named
-
getAssociatedAttrName
java.lang.String getAssociatedAttrName()
Returns the name of the attribute associated with this collection.Collections can be associated with specific attributes of data objects. This method returns the name of that attribute, if any.
- Returns:
- the associated attribute name, or null if not associated with an attribute
-
getOwner
dkDataObjectBase getOwner()
Returns the data object that owns this collection.- Returns:
- the owner data object, or null if this collection is not owned
-
-