Mission Base

Program Base Library Functions

int pblListRemoveAll

( PblList* list, void* collection )

Removes from this list all of its elements that are contained in the specified collection.

Documentation

Removes from this list all of its elements that are contained in the specified collection.

This implementation iterates over this list, checking each element returned by the iterator in turn to see if it's contained in the specified collection.

If it's so contained, it's removed from this list with the iterator's remove method in case of a linked list and with an optimized direct removal method in case of an array list.

This method has a time complexity of O(N * M), with N being the size of the list and M being the size of the collection.

Parameters:
list - The list to use
collection - The collection whose elements are to be removed from this list.
Returns:
int rc > 0: If this list changed as a result of the call.
int rc == 0: This list did not change.
int rc < 0: An error, see pbl_errno:
PBL_ERROR_PARAM_LIST - The list be iterated.
PBL_ERROR_PARAM_COLLECTION - The collection cannot be iterated.
PBL_ERROR_CONCURRENT_MODIFICATION - The list was modified concurrently.

Alphabetic index



This page was generated with the help of DOC++.