diff --git a/src/changes/changes.xml b/src/changes/changes.xml index d03bd5bce..fd3832a6c 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,8 +22,11 @@
coll
will be retained in the
- * bag with the same number of copies prior to this operation. All
- * other objects will be completely removed from this bag.
+ * Remove any members of the bag that are not in the given collection,
+ * not respecting cardinality. That is, any object in the given
+ * collection coll
will be retained in the bag with the same
+ * number of copies prior to this operation. All other objects will be
+ * completely removed from this bag.
+ *
+ * This implementation iterates over the elements of this bag, checking
+ * each element in turn to see if it's contained in coll
.
+ * If it's not contained, it's removed from this bag. As a consequence,
+ * it is advised to use a collection type for coll
that provides
+ * a fast (e.g. O(1)) implementation of {@link Collection#contains(Object)}.
*
* @param coll the collection to retain
* @return true
if this call changed the collection