commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andriy Palamarchuk <ap...@yahoo.com>
Subject TransformedList should return transformed iterator?
Date Wed, 28 Jul 2004 13:43:29 GMT
Currently TransformedList does not redefine iterator()
method and as result returns iterator for original,
not transformed objects. The same problem probably
exists for other Transformed* collections.

Shouldn't this class return TransformedListIterator
instead with following change:

@@ -115,6 +116,10 @@
 
     public ListIterator listIterator(int i) {
         return new
TransformedListIterator(getList().listIterator(i));
+    }
+
+    public Iterator iterator() {
+        return listIterator();
     }
 
     public Object set(int index, Object object) {

Regards,
Andriy


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message