[jdom-interest] children as List

Trebor A. Rude trebor at bwn.net
Fri Sep 1 06:46:55 PDT 2000

On Fri, 01 Sep 2000, Cameron Smith wrote:

>Another issue was ClassCastExceptions.  I think this is more an issue of
>whether or not there should be a unified class hierarchy in JDom, so that
>everything can be safely cast to 'Element', (like Node in DOM) than an
> issue about where to put List behaviour.

	How about creating a tagging interface (like Serializable) instead of 
unifying the class hierarchy? This way, anything that wants to operate on 
just JDOM nodes (and not just a specific class of JDOM nodes) can be sure 
it's got one by testing for the tag. And it provides a useful place to put 
whatever functionality may be common (such as getParent()) if we do decide 
to unify the hierarchy.

Trebor A. Rude
trebor at bwn.net
Registered Linux User #89308

More information about the jdom-interest mailing list