From 740344661c7eb5f819f45d9d0f64668624e9e00e Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Thu, 20 Sep 2012 18:07:01 +0000 Subject: [PATCH] [COLLECTIONS-415/417] Added clarifying javadoc about runtime complexity. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1388146 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections/list/AbstractLinkedList.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java b/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java index 0e8c490bf..9c3f1c084 100644 --- a/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java +++ b/src/main/java/org/apache/commons/collections/list/AbstractLinkedList.java @@ -243,6 +243,15 @@ public abstract class AbstractLinkedList implements List { return false; } + /** + * {@inheritDoc} + *

+ * This implementation iterates over the elements of this list, checking each element in + * turn to see if it's contained in coll. If it's contained, it's removed + * from this list. 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)}. + */ public boolean removeAll(Collection coll) { boolean modified = false; Iterator it = iterator(); @@ -257,6 +266,15 @@ public abstract class AbstractLinkedList implements List { //----------------------------------------------------------------------- + /** + * {@inheritDoc} + *

+ * This implementation iterates over the elements of this list, checking each element in + * turn to see if it's contained in coll. If it's not contained, it's removed + * from this list. 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)}. + */ public boolean retainAll(Collection coll) { boolean modified = false; Iterator it = iterator();