[COLLECTIONS-419] Added clarifying javadoc for AbstractDualBidiMap#retainAll.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1470170 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9bdfac0fad
commit
6e8052608a
|
@ -22,6 +22,9 @@
|
|||
<body>
|
||||
|
||||
<release version="4.0" date="TBA" description="Next release">
|
||||
<action issue="COLLECTIONS-419" dev="tn" type="fix" due-to="Adrian Nistor">
|
||||
Added clarifying javadoc wrt runtime complexity of "AbstractDualBidiMap#retainAll".
|
||||
</action>
|
||||
<action issue="COLLECTIONS-433" dev="tn" type="fix" due-to="Jeffrey Barnes">
|
||||
Improve performance of "TreeList#addAll" and "TreeList(Collection)" by converting
|
||||
the input collection into an AVL tree and efficiently merge it into the existing tree.
|
||||
|
|
|
@ -355,6 +355,15 @@ public abstract class AbstractDualBidiMap<K, V> implements BidiMap<K, V> {
|
|||
return modified;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* This implementation iterates over the elements of this bidi map, checking each element in
|
||||
* turn to see if it's contained in <code>coll</code>. If it's not contained, it's removed
|
||||
* from this bidi map. As a consequence, it is advised to use a collection type for
|
||||
* <code>coll</code> that provides a fast (e.g. O(1)) implementation of
|
||||
* {@link Collection#contains(Object)}.
|
||||
*/
|
||||
@Override
|
||||
public boolean retainAll(final Collection<?> coll) {
|
||||
if (parent.isEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue