Re: Possible bug in JDom2
Rolf Lear <[email protected]> Fri, 16 Mar 2012 05:47:29 -0400
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
That seems almost too easy.... I can see it being very easy to do in this particular use case.... I will have a good look. It will be the documentation that's hardest to do, which is fine.... Thanks Rolf On 16/03/2012 2:38 AM, Thomas Scheffler wrote: > 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] > _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]