[jdom-interest] Re: [jdom-commits] CVS update: jdom/src/java/org/jdom

Noam Tamim noamt at yahoo.com
Wed Oct 10 12:34:54 PDT 2001


--- jhunter at cvs.jdom.org wrote:
> I also implemented PartialList.listIterator() to throw 
> UnsupportedOperationException since it's not yet implemented, and
> probably won't be since FilterList will replace PartialList.  No one
> probably calls the method anyway, but this way in case anyone does they 
> won't wonder why it doesn't work.

I'm not sure it's acceptable to just throw an UnsupportedOperationException
from listIterator(). ListIterator is supposed to be SUPPORTED by any class
that implements List. 
Another way to imeplement ListIterator is to forward all calls to previous(),
hasPrevious() etc. to the "selfIterator", then have set(Object) and
add(Object) throw the exception. 
I actually did it, just after sending you the code for iterator()... Do you
want it?

-Noam.


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



More information about the jdom-interest mailing list