Re: JDom and Java5
"Gregor Zeitlinger" <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Feb 23, 2008 at 9:39 PM, Mattias Jiderhamn <[email protected]> wrote: > BUT there is actually a fourth alternative; add the expected output type > as a parameter to the method. > List<Element> elements = XPath.selectNodes(doc, path, Element.class); > List<Attribute> elements = XPath.selectNodes(doc, path, Attribute.class); > List<Object> elements = XPath.selectNodes(doc, path, Object.class); // > Mix of different types > This may be the most beautiful solution, but also the most noticeable > change with a new parameter. What about an overload with one legacy > version with List and one with the third parameter??? how about List<? extends Object> selectNotes List<Element> selectElements List<Attribute> selectAttributes Gregor _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]