[jdom-interest] For consideration
Andy Clark
andyc at apache.org
Tue May 8 20:35:09 PDT 2001
Amy Lewis wrote:
> 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).
I agree with Amy. Yes, the DOM interfaces have a fly() method
on the base Bird interface when most of the birds in question
are flightless waterfoul but I see this as a good thing. In
Java you avoid the runtime check for ClassCastException by
being able to do "node.getAttributes()" instead of
"((Element)node).getAttributes()".
--
Andy Clark * IBM, TRL - Japan * andyc at apache.org
More information about the jdom-interest
mailing list