You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/04/20 17:05:56 UTC
svn commit: r1470170 - in /commons/proper/collections/trunk/src:
changes/changes.xml
main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
Author: tn
Date: Sat Apr 20 15:05:56 2013
New Revision: 1470170
URL: http://svn.apache.org/r1470170
Log:
[COLLECTIONS-419] Added clarifying javadoc for AbstractDualBidiMap#retainAll.
Modified:
commons/proper/collections/trunk/src/changes/changes.xml
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
Modified: commons/proper/collections/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/changes/changes.xml?rev=1470170&r1=1470169&r2=1470170&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/changes/changes.xml (original)
+++ commons/proper/collections/trunk/src/changes/changes.xml Sat Apr 20 15:05:56 2013
@@ -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.
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java?rev=1470170&r1=1470169&r2=1470170&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bidimap/AbstractDualBidiMap.java Sat Apr 20 15:05:56 2013
@@ -355,6 +355,15 @@ public abstract class AbstractDualBidiMa
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()) {