Hello,

Firstly, SingletonIterator and SingletonListIterator seem quite similar.
Apart from the extra type of 'ListIterator', it appears that a
SingletonListIterator can do the job of a SingletonIterator in all jobs.
Could just remove SingleIterator.

I was thinking can we eliminate those classes by methods returning interface? It is always a good practice to use interface rather than specifying concrete class. I mean just like singleton method of java.util.Collections


Code should be like:

class Collections2 {
  public ResetableIterator singletonIterator () { ... }
  public ResetableListIterator singletonIterator () { ... }
}

It is possible to use just one concrete class for both methods above.

Given there is a few discussion of code review, I think every one is busy maintaining the existing code base.

Takuya Murata
[EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to