[jdom-interest] jdom 1.1
Elliotte Harold
elharo at metalab.unc.edu
Thu Sep 25 08:11:30 PDT 2008
katja.radelicki at colruyt.be wrote:
> Hello,
>
> maybe I put my question in other words:
> the method getChildren returns a LinkedList in jdom 1.0 and 1.1.
> Iterating the LinkedList with a for loop in which you do a get(i) takes
> a lot of time --> O(n²).
> But why it does *not* take a lot of time in jdom 1.0? It's also O(n²)?
> Which difference between jdom 1.0 and jdom 1.1 causes this difference in
> time?
Your premises is incorrect. JDOM never returns a LinkedList and doesn't
use them internally. JDOM prefers ArrayLists.
--
Elliotte Rusty Harold elharo at metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
More information about the jdom-interest
mailing list