[jdom-interest] About the Text class

aci aci2 at ACIUS.net
Fri Jan 11 14:22:19 PST 2002

Stop sending your email info to this address!!
Thank you

-----Original Message-----
From: phil at triloggroup.com [mailto:phil at triloggroup.com]
Sent: Friday, January 11, 2002 2:17 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] About the Text class

Now that this class seems to be adopted, why not leveraging its

First, the JDOM code is full of instanceof operator, checking for particular
content.  Why not creating a base class
that will be the root of the other? Then, a "int getType()" method will be
easier and faster than the use of instanceof.
a sanity check method can then be written like "return

Secundo, there're a lot of similitudes between CDATA and Text: they are both
encapsulating a String. Why not having an
intermediate class that encapsulates the common functionnalities, then
preventing the JDOM user for always checking for
a CDATA and a Text?


To control your jdom-interest membership:

More information about the jdom-interest mailing list