[jdom-interest] Suggestion for new methods for the Element class

bob mcwhirter bob at werken.com
Mon Oct 30 17:07:11 PST 2000

I don't see this as much of a performance gain, as getChildren()
returns the actual list used as storage internally, so



accomplish the same things, and I would assume is exactly what
the presumed methods would do.


> I have a suggestion for a couple of new method for the Element class.
> With the application I am writing, it is useful to know how many
> children (possibly zero) a given Element has before retrieving them in a
> List.  I would like to offer the following new methods for consideration
> by the powers that be:
> public int getChildCount();
> //Returns the number of children nested directly (one level deep) within
> this Element.
> public boolean hasChildren();
> //Returns true if this Element has any children, false otherwise.
> Mark
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

More information about the jdom-interest mailing list