[jdom-interest] getChildren() vs getElements()

philip.nelson at omniresources.com philip.nelson at omniresources.com
Fri Sep 15 12:22:26 PDT 2000

> The proposal isn't:
> getChildElements()
> getChild()
> The proposal is:
> getChildElements()
> getChildElement()

oh boy...

don't forget getElements(), getElement() 

> The former wouldn't be consistent.  One problem with the 
> latter is it's
> almost *too* consistent and hard to differentiate.  It's one reason I
> prefer getChild() / getChildren().  I also prefer it because it leaves
> the option to have getChildTextTrim() which I find really 
> useful.  If we
> go with getChildElement() then it'd be getChildElementTextTrim() and
> that's just too many nouns to be understandable.

As I did before, I agree with this now.  getChild() is perfectly clear.
Those who dislike getChildren have a better case for a name change and
Alex's post was just on that one.

I really don't see this decision making anyone unable to figure out JDOM or
this decision putting JDOM on the long list of good ideas whose time never
came or any other dire consequences of this decision.  So, I will abstain
from further votes and recode (a minor effort) as needed when it happens.
For those to whom it matters much more than me, good luck ;^)

More information about the jdom-interest mailing list