[jdom-interest] no getChildTextNormalize() ?

Kent Johnson kentj at rsn.hp.com
Thu Sep 27 13:15:09 PDT 2001

I really have to agree with Richard.  I think getChild().getTextTrim() is
actually easier to understand too (and definitely fits the OOP model
better).  My only problem was, if you were going to have the other
getChildText*() methods, you need to have one for each 
getText*() method.  It's all or nothing.

So if there is no getting rid of the getChildText*() methods, I am +1 on
getChildTextNormalize().  But if everyone else agrees that the child
helper methods should be gotten rid of, then I agree with that too.

I'm really new around here, and new to any open source project for that
matter, so I'm not really sure how stuff like this works and
is decided.  But I do think there are really 2 issues here: 

1) Does it make sence to have the getChildText() and
getChildTextTrim() methods without the getChildTextNormalize() method?

2) Does it make sense to have any of the getChildText*() methods?

Since I believe number 1) is an obvious no, for consistancy's sake, I am
going to make a getChildTextNormalize() method (yeah I know, real hard
work... hey you gotta start somewhere :) ) and submit a patch for it.  But
I think it should also be decided whether all of these should be

Any thoughts?


On Thu, 27 Sep 2001, rpcee wrote:

> (Apologies if this comes twice)
> I'm not sure how these methods are more convenient? Does it save keystrokes? I 
> don't think it affects maintenance or readability of the application one way 
> or the other. I guess there is a small negative affect on the library source.
> In JBuilder and presumably jEdit, VAJava etc I can type
>     getChild("c").getTextTrim(); in 20 keystrokes, and
>     getChildTextTrim("c"); in 17.
> Using a 5 letter template/abbreviation I can do either in 10, and typing it 
> out straight is only 6 chars different.
> In an IDE one could argue that the larger list of methods after pressing "." 
> is less convenient
> So I guess I'm a -1 for all these sorts of methods, to be honest it's not 
> something that worries me much, but I'd be interested to know why they are 
> considered convenient.
> Cheers, Richard
> _______________________________________________
> 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