Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Iterable Elements

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Nils Kilden-Pedersen" <nilskp AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Iterable Elements
  • Date: Mon, 3 Apr 2006 12:06:53 -0500

Since Iterable is a Java 5.0 interface, how would it *not* break backwards
compatibility?

On 4/3/06, Cormac Blackwell <cormac.blackwell AT gmail.com> wrote:
>
> Hi,
> I was wondering if it would be possible to make the Elements class
> implement
> Iterable<Element>. I saw in the archives that you don't want to make
> Elements implement List as it would break backward compatibility (and
> wouldn't bring that much benefit). I think that implementing Iterable
> would
> be very simple and shouldn't cause any compatiblity problems but would
> make
> Java 5 code which iterates over Elements a lot nicer as the for-each
> syntax
> could be used.
>
> Cormac Blackwell
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>




Archive powered by MHonArc 2.6.24.

Top of Page