[jdom-interest] Re: Ideas for API changes

D Gross justdave at onebox.com
Mon Apr 30 09:08:28 PDT 2001

Jason Hunter wrote:
> Here's my challenge to you:  Figure out the interface of Item.  Keep
> mind that any method declared should be useful across all classes
> implementing the interface.  And keep in mind the interface should
> useful for more than just being a common base interface.  Object is
> enough at being a common base; there would need to be extra value.

Making only Attribute and Element implement an Item interface seems more
natural.  Then the obvious methods in common would be: getName(), getType(),
getValue(), setValue().  Of course, mixed content in elements makes this
more complex.

Then when JDOM includes more schema validation support, we could have
getValidValues() and setValueWithValidation() as a start.

-- Dave
D Gross
justdave at onebox.com

FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com

More information about the jdom-interest mailing list