[jdom-interest] Re: Comments on JDOM b10-rc1
Bradley S. Huffman
hip at cs.okstate.edu
Wed Feb 11 18:05:55 PST 2004
Jason Hunter writes:
> Elliotte Rusty Harold wrote:
> > At 12:04 PM -0800 2/11/04, Jason Hunter wrote:
> >> Well, Node would work (and Parent/Node is a better split than
> >> Parent/Content) but if Document is not a Node that breaks the notion
> >> of Node.
> > Document should be a Node.
> The idea has some merit. Parent would be an interface, Node would be an
> abstract class implemented by all nodes.
What's wrong with 2 interfaces, Parent and Node/Child/Content, and 2 non-public
abstract classes, AbstractParent and AbstractNode/AbstractChild/AbstractContent,
except that Element cann't extend both. But that's not a big deal cause the
handfull of methods in Node/Child/Content are trival to implement. The one
that might be difficult, getValue(), doesn't have a generic implementation
that can be shared between nodes anyway.
More information about the jdom-interest