[jdom-interest] For consideration

Amy Lewis amyzing at talsever.com
Tue May 1 04:20:30 PDT 2001

Through Java 1.1, the available high-level multiple-object manipulation
were Vector, Stack, and Hashtable.  In order to improve performance,
and keep folks from sticking their fingers into dangerous electrical
sockets, Hashtable declared itself to be final; there were similar
sorts of decisions in Vector and Stack (although there was no
relationship between these classes, mind).

For Java 1.2, someone made the decision to recast these classes as part
of a hierarchy, removing final markers (power to the subclassers) and
making *everything* in the hierarchy a Collection.  Collection isn't a
terribly interesting interface.  Other subinterfaces are even less
interesting, if possible, some that are little more than markers that
define alternate behavior for base class APIs.

The Collections library is reasonably well-known to JDOM developers and
designers, who appear to mostly regard it as a resource in the
construction of JDOM.  I invite, in addition, considering it as a
model, both in how it works (things that *are* collections are marked
collections), and in the problems that it commonly raises (I, for one,
hate having to cast my objects back to what they were to start with,
but this is a limitation of the language and the design of the library
which won't be solved without the introduction of something like
generic java).

Amelia A. Lewis          alicorn at mindspring.com          amyzing at talsever.com
I know you don't want either to give or to take.  You've tried being the
giver, and you've found that the giver is always fooled.  And you won't be
the taker, because that's very difficult, and because you know that the
taker always ends by hating the giver.  You don't want ever again to have to
depend for happiness on another person.
						-- Lord Peter Wimsey

More information about the jdom-interest mailing list