[jdom-interest] getChildren() vs getElements()
Simon Harris
Haruki_Zaemon at hotmail.com
Fri Sep 15 18:09:27 PDT 2000
Hey I'll go with this too. My vote is for consitency not any name in
particular :)
Simon.
----- Original Message -----
From: "Will Glozer" <will.glozer at jda.com>
To: <jdom-interest at jdom.org>
Sent: Saturday, September 16, 2000 5:38 AM
Subject: RE: [jdom-interest] getChildren() vs getElements()
> I agree completely, getChild()/getChildren() is more
> understandable and clean imho. It is nice to have
> verbose method names, but there is a point when it
> becomes far too verbose.
>
> Regards,
> Will
>
> -----Original Message-----
> From: Jason Hunter [mailto:jhunter at collab.net]
> Sent: Friday, September 15, 2000 11:56 AM
> To: philip.nelson at omniresources.com
> Cc:
> Subject: Re: [jdom-interest] getChildren() vs getElements()
>
>
> > Here I can agree with getChildElements() because we are
> > still consistent with the name getChild() which returns a
> > (strongly typed) Element wheras getChildren() returns a List
> > of Objects and only the docs can tell you what to expect.
>
> The proposal isn't:
>
> getChildElements()
> getChild()
>
> The proposal is:
>
> getChildElements()
> getChildElement()
>
> 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.
>
> -jh-
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> t.com
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
>
More information about the jdom-interest
mailing list