commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Takuya Murata <tak...@manjiro.net>
Subject Re: [collections] Questions....
Date Wed, 20 Aug 2003 10:55:00 GMT

On Wednesday, August 20, 2003, at 12:41  PM, Henri Yandell wrote:

>
>
> On Wed, 20 Aug 2003, Takuya Murata wrote:
>
>> Yes, this is in line with your proposal; we can use
>> SingletonListIterator for both Iterator and ListIterator. I think the
>> problem of this solution is users probably expect SingletonIterator
>> intuitively and might be puzzled why there is no such.
>
> Agreed. It is the logical name. So solution there is to remove
> SingletonListIterator and quietly make SingletonIterator a 
> ListIterator? :)
>
> Hen

A tricky situation is

class A {
   public void method (Iterator i);
   public void method (ListIterator i);
};

new A ().method (new SingletonIterator ());

Otherwise, I think it is fine.


Mime
View raw message