[jdom-interest] Possible bug in JDom2

Thomas Scheffler thomas.scheffler at uni-jena.de
Thu Mar 15 23:38:02 PDT 2012

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.



More information about the jdom-interest mailing list