Re: Possible bug in JDom2
Thomas Scheffler <[email protected]> Fri, 16 Mar 2012 07:38:02 +0100
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Organization | Friedrich-Schiller-Universität Jena |
| Message-ID | <[email protected]> |
Am 16.03.2012 00:03, schrieb Rolf Lear: > Hi Craig. > > I think my previous reply was a bit hurried... thinking about it more, I > get the following... > > - It would be nice to return 'Iterable', because that would make the > 'enhanced' for possible.... but how important is the enhanced for? > - it would require a new method (actually two) in org.jdom2.Parent > - it would also be nice to have a method getSelfAndDescendants() > - but that would be complicated on Document, because 'self' is not > Content (it's Document). Hi Rolf, my suggestion: create an Interface IterableIterator that implements both interfaces (Iterable, Iterator) and make this the new return type. This will keep the compatibility and allows those fancy for loops. Regards Thomas _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]