I've just added a simple SingletonIterator class to the collections package
together with a JUnit test case to ensure it works properly.

It essentially provides an Iterator interfaces over a single object. I've
found this simple class suprisingly useful when working with the Java
Collections Framework and have ended up with implementations of this class
in various projects. Now I think the collections package has most
iterator-adapters covered: singleton object, array or enumeration.

James





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to