[jdom-interest] Text class (Question)
ecky
ecky at free.fr
Mon May 28 12:36:18 PDT 2001
> > So why not just sbuclassing StringBuffer as it was suggested
> > in the mail
> > I replied to - and implement the additional methods needed for the
> > node interface?
>
> A stringbuffer is how it's stored, not what it *is*. How it's stored
could
> change and that is the point.
>
I see, nevertheless I consider the difference marginal, as a derriving class
is not the baseclass, i.e. it is something different. BTW classes that are
inherited are represented as members of the deriving class on the machine
afterwards anyway (just to demonstrate how close the approaches are).
To change the representation you may just change the inheritance, i.e.
the base class, the interface should remain the same.
For me it is important that the classes inheriting from each other share a
great part of common behaviour and features - maybe it's just my personal
point of view.
> Since JDOM is built on the idea that
> subclassing should be easy and a good idea, I would think that subclassing
a
> JDOM specific base class makes more sense than subclassing JavaSoft's
> StringBuffer.
>
Well, I'm not keen on subclassing JavaSoft Classes, for me it is just
a design issue that I try to understand. How ever I must have missed
something: Where does Text derive from or is base for? Did not
find anything about that.
--
ecky
More information about the jdom-interest
mailing list