Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] adding an iterator() method to nodes

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'Christian Vest Hansen'" <karmazilla AT gmail.com>, "'Steve Loughran'" <steve.loughran AT gmail.com>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] adding an iterator() method to nodes
  • Date: Tue, 31 Oct 2006 19:21:03 -0000

>
> Not as long as you can guarentee that the returned iterator
> is positioned so that it will return the first element in the
> collection (if any) upon the first call to next() ;)

You also need to guarantee that calls to next() will have no side-effects on
the Iterators that were supplied to other clients: which I think is going to
be a bit difficult if the same Iterator is reused, especially as an Iterator
has no close() method that allows the user to say it's not needed any more!

Michael Kay





Archive powered by MHonArc 2.6.24.

Top of Page