[jdom-interest] For consideration

Amy Lewis amyzing at talsever.com
Fri May 4 21:39:37 PDT 2001

On Fri, May 04, 2001 at 01:58:57PM -0700, James Duncan Davidson wrote:
>> I think Collection would qualify as interesting.  It has 15 methods.  A
>> List only has 25 total, so the majority of List is inherited from
>> Collection.
>What is truly interesting is that there are no *wasted* methods from 
>Collection in List. List truly isa Collection in that every method from 
>Collection is meaningful. This in contrast to the DOM style of using 
>interfaces where methods that don't do anything are still around.
>IOW, I don't want to see a fly() method on something doesn't have wings.

Real world: squirrels fly() (at least well enough) without wings (they
glide, really, but they have gliding surfaces).  Rockets fly(). 
Ostriches don't fly() (but have wings).  A number of boats have
surfaces that probably qualify as "wings" and serve a similar purpose
in liquid instead of air ... but they don't fly(), except

IOW, if the exceptions reflect reality, I can live with Bird.fly(),
even if some Birds have to throw OperationNotSupportedException (which,
btw, was *introduced* with the introduction of the new Collections
classes, and caused a tempest in a teapot as a result).

Amelia A. Lewis          alicorn at mindspring.com          amyzing at talsever.com
You like the taste of danger, it shines like sugar on your lips, and you like
to stand in the line of fire just to show you can shoot straight from your
hip. There must be a 1000 things you would die for; I can hardly think of two.
		                                -- Emily Saliers

More information about the jdom-interest mailing list