Re: XML APIs

Jonathan Robie wrote:

> 1. Make next() an atomic operation for an iterator, so that the structure
> is assumed not to change during a next().
>
> 2. Ensure that an iterator knows when the position to which it refers
> becomes invalid.

...and can report it to its client.

The new java.util.Iterator class from Java 1.2 also has a remove()
method, which removes the last object returned by next() in a
guaranteed safe manner; this operation can of course fail if the
container is read-only.
 
-- 
John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)

Received on Tuesday, 3 November 1998 15:30:39 UTC